/* =========================================================
   ringtone.hinglishpoint.com — Global Theme
   Version: 2.0.0 (With User Dropdown)
   ========================================================= */

:root {
    --primary: #e91e63;
    --primary-hover: #c2185b;
    --secondary: #9c27b0;
    --body-bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --text: #202124;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --success: #198754;
    --danger: #dc3545;
    --warning: #f59e0b;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .05);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, .08);
    --radius-sm: 7px;
    --radius-md: 11px;
    --radius-lg: 17px;
    --radius-xl: 24px;
    --container: 1180px;
    --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
    --body-bg: #101114;
    --surface: #181a1f;
    --surface-2: #202229;
    --text: #f3f4f6;
    --text-muted: #a1a1aa;
    --border: #2e3139;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .25);
    --shadow-md: 0 10px 35px rgba(0, 0, 0, .35);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        --body-bg: #101114;
        --surface: #181a1f;
        --surface-2: #202229;
        --text: #f3f4f6;
        --text-muted: #a1a1aa;
        --border: #2e3139;
        --shadow-sm: 0 2px 12px rgba(0, 0, 0, .25);
        --shadow-md: 0 10px 35px rgba(0, 0, 0, .35);
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--body-bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color .2s ease, color .2s ease;
}
button, a, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 3px solid rgba(233, 30, 99, .35); outline-offset: 3px; }

.container {
    width: min(calc(100% - 32px), var(--container));
    margin-inline: auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.navbar {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 20px;
    white-space: nowrap;
}
.logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 18px;
    box-shadow: 0 6px 18px rgba(233, 30, 99, .22);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-links a {
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: background .2s ease, color .2s ease;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* SEARCH FORM HEADER */
.search-form-header {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface-2);
    transition: border-color .2s ease;
}
.search-form-header:focus-within { border-color: var(--primary); }
.search-form-header input {
    border: none;
    background: transparent;
    color: var(--text);
    padding: 8px 14px;
    font-size: 14px;
    width: 180px;
    outline: none;
}
.search-form-header button {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 8px 12px;
    font-size: 15px;
    transition: color .2s ease;
}
.search-form-header button:hover { color: var(--primary); }

/* THEME & MENU BUTTONS */
.theme-button, .menu-button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 17px;
}
.menu-button { display: none; width: 42px; height: 42px; }

/* =========================================================
   USER MENU / DROPDOWN  ← 🔥 YEH MISSING THA
   ========================================================= */

.user-menu-wrapper {
    position: relative;
    display: inline-block;
}

.user-icon-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
}

.user-icon-btn:hover {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

.user-icon-btn.logged-in { padding: 4px 12px 4px 4px; }

.user-icon-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.user-icon-default {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.user-icon-btn[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* DROPDOWN MENU */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 9999;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: var(--surface-2);
}

.dropdown-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.dropdown-user-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-user-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-user-status {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    color: var(--primary);
}

.dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 5px 0;
}

.dropdown-item-primary {
    color: var(--primary);
    font-weight: 700;
}

.dropdown-item-primary:hover {
    background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.dropdown-item-danger {
    color: var(--danger);
}

.dropdown-item-danger:hover {
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    color: var(--danger);
}

/* MOBILE USER INFO */
.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.mobile-user-name {
    font-weight: 700;
    font-size: 14px;
}

.mobile-user-status {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 14px;
    transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 7px 20px rgba(233, 30, 99, .18);
}
.btn-outline {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

/* =========================================================
   HERO
   ========================================================= */

.hero { padding: clamp(55px, 8vw, 100px) 0 clamp(45px, 7vw, 80px); }
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 55px;
    align-items: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 9%, transparent);
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 17px;
}
.hero h1 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -2.5px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-description {
    max-width: 650px;
    margin: 22px 0 0;
    color: var(--text-muted);
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.75;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 30px;
}
.hero-card {
    padding: 30px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--surface), var(--surface-2));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.heart { font-size: 46px; margin-bottom: 15px; }
.hero-card h2 { margin: 0 0 9px; font-size: 24px; }
.hero-card p { margin: 0; color: var(--text-muted); line-height: 1.7; }

/* =========================================================
   SECTION
   ========================================================= */

.section { padding: clamp(48px, 7vw, 80px) 0; }
.section-alt { background: var(--surface-2); }
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 27px;
}
.section-heading h1, .section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -.8px;
}
.section-heading p {
    margin: 6px 0 0;
    color: var(--text-muted);
    max-width: 650px;
}
.section-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

/* =========================================================
   CARDS
   ========================================================= */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
}

/* TYPE GRID */
.type-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}
.type-card { padding: 22px; text-align: center; }
.type-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 13px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--primary) 9%, transparent);
    font-size: 24px;
}
.type-card h3 { margin: 0; font-size: 16px; }
.type-card p { margin: 7px 0 0; color: var(--text-muted); font-size: 13px; }

/* CTA */
.cta {
    padding: clamp(40px, 6vw, 65px);
    text-align: center;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, var(--surface)), color-mix(in srgb, var(--secondary) 10%, var(--surface)));
    border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--border));
}
.cta h2 { margin: 0; font-size: clamp(27px, 5vw, 42px); letter-spacing: -1px; }
.cta p { max-width: 650px; margin: 13px auto 25px; color: var(--text-muted); }

/* PAGE CONTENT */
.page-content { max-width: 800px; margin: 0 auto; }
.page-content h1 { font-size: 36px; margin-bottom: 20px; }
.page-content h2 { font-size: 24px; margin: 30px 0 15px; }
.page-content p, .page-content li { color: var(--text-muted); line-height: 1.8; }
.page-content a { color: var(--primary); font-weight: 600; }

/* FORMS */
.contact-form, .search-form-large {
    max-width: 600px;
    margin: 30px auto 0;
}
.search-form-large {
    display: flex;
    gap: 10px;
    max-width: 700px;
}
.search-form-large input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--body-bg);
    color: var(--text);
    font-size: 16px;
}
.search-form-large input:focus { border-color: var(--primary); outline: none; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--body-bg);
    color: var(--text);
    font-size: 16px;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 50px 0 25px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 35px;
}
.footer-brand p {
    max-width: 390px;
    color: var(--text-muted);
    line-height: 1.7;
}
.footer-title { margin: 0 0 14px; font-size: 14px; }
.footer-links { display: grid; gap: 9px; }
.footer-links a { color: var(--text-muted); font-size: 14px; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: var(--text-muted);
    font-size: 13px;
}

/* MOBILE MENU LINKS */
.nav-links-mobile {
    display: block;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 650;
    text-decoration: none;
}
.nav-links-mobile:hover {
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 950px) {
    .nav-links { display: none; }
    .menu-button { display: grid; place-items: center; }
    .hero-grid { grid-template-columns: 1fr; }
    .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .search-form-header input { width: 120px; }

    /* User menu mobile: hide name & arrow, show only avatar */
    .user-name { display: none; }
    .user-icon-btn { padding: 4px; border-radius: 50%; }
    .user-icon-btn.logged-in { padding: 4px; }
    .dropdown-arrow { display: none; }
}

@media (max-width: 620px) {
    .container { width: min(calc(100% - 24px), var(--container)); }
    .navbar { min-height: 62px; }
    .logo { font-size: 17px; }
    .logo-mark { width: 36px; height: 36px; font-size: 16px; }
    .hero h1 { letter-spacing: -1.7px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .type-grid, .footer-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: start; flex-direction: column; }
    .footer-bottom { flex-direction: column; }
    .hero-card { padding: 24px; }
    .search-form-header { display: none; }
    .search-form-large { flex-direction: column; }

    /* User dropdown position on mobile */
    .user-dropdown { width: 240px; right: -50px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}