/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #2d3436;
    --primary-hover: #000000;
    --accent: #007bff;
    --danger: #ff4757;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --radius: 20px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    /* Beautiful gradient background */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}

h1,
h2,
h3 {
    margin-top: 0;
    color: var(--text-main);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* Auth Containers */
.auth-container {
    max-width: 90%;
    width: 400px;
    margin: 60px auto;
    padding: 40px 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.85);
    /* Slightly more opaque for readability */
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.auth-container h2 {
    font-size: 28px;
    margin-bottom: 24px;
    background: linear-gradient(45deg, #111, #444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-container input {
    width: 100%;
    padding: 16px;
    margin-bottom: 16px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    font-size: 16px;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.auth-container input:focus {
    outline: none;
    border-color: var(--text-main);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.auth-container button {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 10px;
}

.auth-container button:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 800px;
    width: 95%;
    margin: 30px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-header h1 {
    font-size: 24px;
    margin: 0;
}

.preview-link {
    display: block;
    text-align: center;
    margin-bottom: 30px;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
    transition: 0.3s;
}

.preview-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    background: white;
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* List Items (Admin users / Links) */
.link-item,
tr {
    background: rgba(255, 255, 255, 0.5);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: 0.2s;
}

.dashboard-container table tr {
    display: table-row;
    /* Reset for tables */
    background: transparent;
}

.dashboard-container table tbody tr:hover {
    background: rgba(255, 255, 255, 0.5);
}

.link-item:hover {
    background: white;
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-red {
    color: var(--danger);
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 8px;
    transition: 0.2s;
}

.btn-red:hover {
    background: var(--danger);
    color: white;
}

/* Public Profile - The Mobile App Look */
.profile-wrapper {
    max-width: 420px;
    margin: 40px auto;
    padding: 40px 24px;
    text-align: center;
    /* Glass Effect for the whole profile card */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.avatar {
    width: 110px;
    height: 110px;
    background: white;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: var(--primary);
    background-size: cover;
    background-position: center;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.profile-wrapper h1 {
    font-size: 26px;
    margin-bottom: 8px;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.profile-wrapper p {
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
    font-size: 15px;
    font-weight: 500;
}

.btn-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary);
    padding: 18px;
    margin-bottom: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    font-weight: 700;
    font-size: 16px;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-link:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    background: white;
}

/* Brand Colors */
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background-color: #22bf5b;
    box-shadow: 0 15px 25px rgba(37, 211, 102, 0.4);
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border: none;
    box-shadow: 0 10px 20px rgba(220, 39, 67, 0.3);
}

.btn-instagram:hover {
    box-shadow: 0 15px 25px rgba(220, 39, 67, 0.4);
    filter: brightness(1.1);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .dashboard-container {
        padding: 20px;
        width: 100%;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        background: rgba(255, 255, 255, 0.9);
    }

    .profile-wrapper {
        margin: 20px auto;
        width: 90%;
        padding: 30px 20px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
}