:root {
    --primary-color: #1d0e4f;
    --gradient-accent: linear-gradient(135deg, #4f29f0 0%, #a033ff 100%);
    --secondary-color: #f2f2f2;
    --accent-color: #eff1f3;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --bg-white: #ffffff;
    --radius: 20px;
    --font-main: 'KOSans', 'GuesswhatExceptional', 'IBM Plex Sans Arabic', sans-serif;
    --header-height: 85px;
    --container-width: 1200px;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Guesswhat Exceptional */
@font-face {
    font-family: 'GuesswhatExceptional';
    src: url('/assets/font/Guesswhat-Exceptional (1).otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* KOSans Family */
@font-face {
    font-family: 'KOSans';
    src: url('/assets/font/PingAR+LT-Regular.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'KOSans';
    src: url('/assets/font/PingAR+LT-Regular.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'KOSans';
    src: url('/assets/font/PingAR+LT-Regular.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'KOSans';
    src: url('/assets/font/PingAR+LT-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'KOSans';
    src: url('/assets/font/PingAR+LT-Bold.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'KOSans';
    src: url('/assets/font/PingAR+LT-Bold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'KOSans';
    src: url('/assets/font/PingAR+LT-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SaudiRiyalSymbol';
    src: url('/assets/font/saudi_riyal.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-white);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.riyal-icon {
    font-family: 'SaudiRiyalSymbol';
    font-style: normal;
    font-size: inherit;
    line-height: 1;
}
.riyal-icon::before {
    content: "\e900";
    font-family: 'SaudiRiyalSymbol';
}

.main-header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: transparent;
    border-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    top: 15px;
    height: 65px;
    width: 90%;
    padding: 0 1.5%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(221, 221, 221, 0.5);
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.logo { font-size: 1.4rem; font-weight: 700; }
.logo img { width: 100px; margin-bottom: -11px; }

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    margin: 0 15px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.nav-links a:hover { color: var(--primary-color); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-container { position: relative; }

.lang-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.lang-toggle:hover { background-color: var(--accent-color); }

.lang-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: var(--bg-white);
    border: 1px solid var(--accent-color);
    border-radius: var(--radius);
    min-width: 160px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transform: translateY(-10px);
    transition: var(--transition-smooth);
    z-index: 1001;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.lang-dropdown a:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

button {
    cursor: pointer;
    border-radius: var(--radius);
    padding: 12px 35px 10px;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition-smooth);
    border: none;
}

.btn-login:hover, .btn-signup:hover, .btn-primary:hover { filter: brightness(1.25); }
.btn-secondary:hover { background: #e6e6e6 }
button:active { transform: scale(0.95); }

.btn-login { background: none; border: 1px solid var(--accent-color); }
.btn-signup { background: var(--primary-color); color: white; }
.btn-primary { background: var(--primary-color); color: white; font-size: 1rem; }
.btn-secondary { background: var(--secondary-color); font-size: 1rem; }

a.btn-primary,
a.btn-secondary {
    display: inline-block;
    cursor: pointer;
    border-radius: var(--radius);
    padding: 12px 35px 10px;
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    transition: var(--transition-smooth);
}

a.btn-primary { background: var(--primary-color); color: white; }
a.btn-secondary { background: var(--secondary-color); color: var(--text-main); }
a.btn-primary:hover { filter: brightness(1.25); }
a.btn-secondary:hover { background: #e6e6e6; }

.toggle-switch {
    margin-top: 8px;
}

.switch-label {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.switch-slider {
    position: relative;
    width: 54px;
    height: 28px;
    background: #ccc;
    border-radius: 28px;
    transition: background 0.3s ease;
}

.switch-slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

input[type="checkbox"]:checked + .switch-label .switch-slider {
    background: #28a745;
}

input[type="checkbox"]:checked + .switch-label .switch-slider::before {
    transform: translateX(26px);
}

.switch-text {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.input-group input,
.input-group select {
    width: 100%;
    height: 47.5px;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-smooth);
    appearance: none;
    -webkit-appearance: none;
}

/* Custom Select Styling */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 47.5px;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.custom-select-trigger:after {
    content: "";
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.3s ease;
}

.custom-select-wrapper.open .custom-select-trigger {
    background-color: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(29, 14, 79, 0.05);
}

.custom-select-wrapper.open .custom-select-trigger:after {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: grid;
    gap: 5px;
    background-color: var(--bg-white);
    border: 1px solid var(--accent-color);
    border-radius: var(--radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-smooth);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 12px 15px;
    cursor: pointer;
    border-radius: calc(var(--radius) - 8px);
    transition: background 0.2s ease;
    font-size: 0.95rem;
}

.custom-option:hover {
    background-color: var(--secondary-color);
}

.custom-option.selected {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 500;
}

.input-group select {
    display: none;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    background-color: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(29, 14, 79, 0.05);
}

.input-prefix {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.prefix-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: var(--secondary-color);
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid transparent;
    border-right: none;
    min-width: 55px;
}

.input-prefix input {
    border-radius: 0 var(--radius) var(--radius) 0;
    border-left: none;
}

.input-prefix input:focus {
    border-color: var(--primary-color);
}

.prefix-box .riyal-icon {
    font-size: 1.8rem;
    margin-bottom: -3px;
}

.prefix-box i {
    font-size: 1.2rem;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password {
    position: absolute;
    left: 15px;
    background: none;
    border: none;
    padding: 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.toggle-password:hover { color: var(--primary-color); }

.main-footer {
    background: var(--secondary-color);
    padding: 100px 5% 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 50px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.footer-bottom {
    text-align: center;
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    color: var(--text-muted);
}