/* =========================
   Google Play Theme System
   ========================= */
:root {
    /* Google Play Colors */
    --gp-green: #00C853;
    --gp-blue: #4285F4;
    --gp-red: #EA4335;
    --gp-yellow: #FBBC05;

    /* Default = Dark Theme */
    --primary: #00C853;
    --primary-hover: #00E676;
    --secondary: #4285F4;
    --accent-red: #EA4335;
    --accent-yellow: #FBBC05;

    --bg-main: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-gradient-start: #1e293b;
    --bg-gradient-end: #0f172a;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* Light Mode */
[data-theme="light"] {
    --primary: #00C853;
    --primary-hover: #00A846;
    --secondary: #4285F4;

    --bg-main: #f8f9fa;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-gradient-start: #e9ecef;
    --bg-gradient-end: #f8f9fa;

    --text-main: #1a1a2e;
    --text-muted: #6c757d;
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

@font-face {
    font-family: 'DINNext';
    src: url('fonts/DINNext.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DINNext', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
}

body {
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[dir="rtl"] body {
    direction: rtl;
}

[dir="ltr"] body {
    direction: ltr;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    z-index: -1;
    transition: background 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    transition: background 0.3s ease, border 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.4);
}

/* Secondary/Outline Button */
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ========================
   Light Mode Overrides
   ======================== */
[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .hero-btns .btn.glass-card {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary) !important;
}

[data-theme="light"] .hero-btns .btn.glass-card:hover {
    background: var(--primary);
    color: white !important;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: white;
    color: #1a1a2e;
    border-color: #dee2e6;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    background: white;
    border-color: var(--primary);
}

[data-theme="light"] .lang-switcher {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .topbar {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nav-link {
    color: #495057;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    background: rgba(0, 200, 83, 0.1);
    color: var(--primary);
}

[data-theme="light"] .notif-dropdown {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .notif-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .modal-content {
    background: white;
}

[data-theme="light"] .modal-notif-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .modal-notif-item.unread {
    background: rgba(0, 200, 83, 0.05);
    border-color: rgba(0, 200, 83, 0.2);
}

[data-theme="light"] table th,
[data-theme="light"] table td {
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .feature-icon {
    color: var(--primary);
}

/* Public Header & Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-decoration: none;
}

.lang-switcher {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
}

.lang-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
}

.lang-link:hover,
.lang-active {
    color: var(--primary);
    font-weight: bold;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Forms */
input,
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.6rem;
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.6);
    color: white;
    margin-bottom: 1.2rem;
    transition: 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 0.5rem;
    border-radius: 0.6rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: 0.3s;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-google,
.btn-github {
    background: #e2e8f0;
    color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-google:hover,
.btn-github:hover {
    background: #cbd5e1;
    color: #000;
    transform: translateY(-2px);
}

.btn-facebook {
    background: #1877f2;
    color: white;
}

.btn-facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
}

/* Grid System */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin: 4rem 0;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}


/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: block;
    color: white;
    text-decoration: none;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
}

.footer-links ul li a:hover {
    color: var(--primary);
}

/* Mobile Adaptations */
@media (max-width: 992px) {
    .menu-toggle {
        display: block !important;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Light Mode Overrides */
html[data-theme="light"] .menu-toggle,
html[data-theme="light"] .mobile-logo {
    color: var(--text-main);
}

html[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-main);
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #9ca3af;
}

html[data-theme="light"] .stat-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.show {
    display: flex !important;
}

.custom-confirm-modal {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
    opacity: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: auto;
    /* Ensure it stays centered */
}

.modal-overlay.show .custom-confirm-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.modal-icon-circle.warning {
    background: rgba(251, 188, 5, 0.15);
    color: var(--accent-yellow);
}

.modal-icon-circle.error {
    background: rgba(234, 67, 53, 0.15);
    color: var(--accent-red);
}

.modal-icon-circle.success {
    background: rgba(0, 200, 83, 0.15);
    color: var(--primary);
}

.modal-title-text {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.modal-desc-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.modal-action-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn-confirm-yes {
    flex: 1;
    padding: 0.8rem;
    border-radius: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    background: var(--primary);
    color: white;
}

.modal-btn-confirm-yes:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.modal-btn-cancel-no {
    flex: 1;
    padding: 0.8rem;
    border-radius: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.modal-btn-cancel-no:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .custom-confirm-modal {
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}