/* ===== CSS Variables ===== */
:root {
/* Brand Colors */
--primary: #143257;
--primary-dark: #0d1f38;
--primary-light: #1a4673;
--secondary: #205388;
--accent-green: #39634B;
--accent-red: #8B2119;
--success: #39634B;
--danger: #8B2119;

/* Text Colors */
--text: #1f2937;
--text-light: #6b7280;
--text-white: #ffffff;
--text-white-muted: rgba(255, 255, 255, 0.9);
--text-white-light: rgba(255, 255, 255, 0.7);

/* Background & Effects */
--bg: linear-gradient(135deg, #143257 0%, #205388 50%, #39634B 100%);
--glass-bg: rgba(255, 255, 255, 0.15);
--glass-border: rgba(255, 255, 255, 0.25);
--shadow: 0 8px 32px rgba(20, 50, 87, 0.2);
--shadow-hover: 0 12px 40px rgba(20, 50, 87, 0.3);
--radius: 16px;
--radius-sm: 8px;
--radius-lg: 20px;

/* Fonts */
--font-arabic: 'Noto Sans Arabic', Arial, sans-serif;
--font-en-heavy: 'Mont', -apple-system, BlinkMacSystemFont, sans-serif;
--font-en-light: 'Mont', -apple-system, BlinkMacSystemFont, sans-serif;

/* Transitions */
--transition: all 0.3s ease;
--transition-fast: all 0.2s ease;
}

/* ===== Global Styles ===== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

*:focus {
outline: 2px solid rgba(255, 255, 255, 0.5);
outline-offset: 2px;
}

body {
font-family: var(--font-arabic);
background: var(--bg);
min-height: 100vh;
color: var(--text);
direction: rtl;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow-x: hidden;
}

/* English Text - Heavy */
h1, h2, h3, .hero-title, .nav-brand, .btn {
font-family: var(--font-en-heavy);
font-weight: 700;
}

/* English Text - ExtraLight */
.hero-subtitle, .footer-content, .stat-numbers {
font-family: var(--font-en-light);
font-weight: 200;
}

/* Arabic Text */
body, p, label, input, select, textarea, .auth-footer, .book-author {
font-family: var(--font-arabic);
}

/* ===== Logo & Icon Styles ===== */
.hero-logo {
    height: 80px;
    width: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.nav-logo {
    height: 45px;
    width: auto;
    margin-left: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.auth-logo {
    height: 60px;
    width: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* ===== Glass Card ===== */
.glass-card {
background: var(--glass-bg);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid var(--glass-border);
border-radius: var(--radius);
box-shadow: var(--shadow);
transition: var(--transition);
}

.glass-card:hover {
box-shadow: var(--shadow-hover);
}

/* ===== Landing Page ===== */
.landing-page {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 20px;
}

.landing-container {
width: 100%;
max-width: 600px;
}

.landing-hero {
padding: 60px 40px;
text-align: center;
}

.hero-icon {
font-size: 80px;
color: var(--text-white);
margin-bottom: 20px;
display: block;
animation: float 3s ease-in-out infinite;
}

@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}

.hero-title {
font-size: 48px;
color: var(--text-white);
margin-bottom: 20px;
font-weight: 700;
letter-spacing: -0.5px;
}

.hero-subtitle {
font-size: 18px;
color: var(--text-white-muted);
margin-bottom: 40px;
line-height: 1.6;
}

.hero-buttons {
display: flex;
gap: 15px;
justify-content: center;
flex-wrap: wrap;
}

.landing-footer {
margin-top: 30px;
text-align: center;
}

.footer-content {
color: var(--text-white);
font-size: 16px;
}

.footer-content p {
margin-bottom: 20px;
font-weight: 300;
}

.footer-links {
display: flex;
gap: 20px;
justify-content: center;
margin-bottom: 20px;
flex-wrap: wrap;
}

.footer-links a {
color: var(--text-white);
text-decoration: none;
font-size: 14px;
transition: var(--transition-fast);
opacity: 0.9;
}

.footer-links a:hover {
opacity: 1;
transform: translateY(-1px);
}

.social-links {
display: flex;
gap: 15px;
justify-content: center;
}

.social-links a {
color: var(--text-white);
font-size: 22px;
transition: var(--transition-fast);
display: inline-flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
text-decoration: none;
}

.social-links a:hover {
transform: translateY(-3px);
background: rgba(255, 255, 255, 0.2);
}

/* ===== Auth Pages ===== */
.auth-page {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 20px;
}

.auth-container {
width: 100%;
max-width: 450px;
}

.auth-card {
padding: 40px;
}

.auth-header {
text-align: center;
margin-bottom: 30px;
}

.auth-header i {
font-size: 48px;
color: var(--text-white);
margin-bottom: 15px;
display: block;
}

.auth-header h2 {
color: var(--text-white);
font-size: 28px;
}

.auth-form {
margin-bottom: 20px;
}

.form-group {
margin-bottom: 20px;
}

.form-group label {
display: block;
color: var(--text-white);
margin-bottom: 8px;
font-weight: 500;
font-size: 15px;
}

.form-group label i {
margin-left: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
width: 100%;
max-width: 100%;
padding: 12px 16px;
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: var(--radius-sm);
color: var(--text-white);
font-size: 16px;
transition: var(--transition);
font-family: var(--font-arabic);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
background: rgba(255, 255, 255, 0.25);
border-color: rgba(255, 255, 255, 0.5);
}

.form-group select {
cursor: pointer;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: left 12px center;
padding-left: 35px;
}

.form-group textarea {
min-height: 100px;
resize: vertical;
}

.auth-footer {
text-align: center;
color: var(--text-white);
}

.auth-footer a {
color: var(--text-white);
text-decoration: none;
font-weight: 600;
transition: var(--transition);
opacity: 0.9;
}

.auth-footer a:hover {
opacity: 1;
}

.auth-footer p {
margin: 10px 0;
}

/* ===== Buttons ===== */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 12px 24px;
border: none;
border-radius: var(--radius-sm);
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: var(--transition);
text-decoration: none;
white-space: nowrap;
}

.btn i {
font-size: 18px;
}

.btn-primary {
background: var(--text-white);
color: var(--primary);
}

.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
background: rgba(255, 255, 255, 0.95);
}

.btn-secondary {
background: rgba(255, 255, 255, 0.2);
color: var(--text-white);
border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
background: rgba(255, 255, 255, 0.3);
border-color: rgba(255, 255, 255, 0.5);
}

.btn-block {
width: 100%;
justify-content: center;
}

.btn-icon {
padding: 8px 12px;
background: rgba(255, 255, 255, 0.2);
border: none;
border-radius: var(--radius-sm);
color: var(--text-white);
cursor: pointer;
transition: var(--transition);
display: inline-flex;
align-items: center;
justify-content: center;
}

.btn-icon:hover {
background: rgba(255, 255, 255, 0.3);
}

.btn-danger {
background: rgba(139, 33, 25, 0.4);
color: var(--text-white);
}

.btn-danger:hover {
background: var(--danger);
}

.btn-timer {
padding: 10px 20px;
background: var(--success);
color: var(--text-white);
border: none;
border-radius: var(--radius-sm);
font-weight: 600;
cursor: pointer;
transition: var(--transition);
}

.btn-timer.active {
background: var(--danger);
}

.btn-timer:hover {
transform: scale(1.05);
}

/* ===== Alerts ===== */
.alert {
padding: 15px;
border-radius: var(--radius-sm);
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 10px;
}

.alert i {
font-size: 20px;
}

.alert-error {
background: rgba(139, 33, 25, 0.3);
color: var(--text-white);
border: 1px solid rgba(139, 33, 25, 0.5);
}

.alert-success {
background: rgba(57, 99, 75, 0.3);
color: var(--text-white);
border: 1px solid rgba(57, 99, 75, 0.5);
}

/* ===== Navbar ===== */
.navbar {
margin: 20px;
padding: 15px 25px;
position: sticky;
top: 20px;
z-index: 100;
}

.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 20px;
}

.nav-brand {
display: flex;
align-items: center;
gap: 12px;
color: var(--text-white);
font-size: 24px;
font-weight: 700;
text-decoration: none;
}

.nav-brand i {
font-size: 28px;
}

.nav-menu {
display: flex;
align-items: center;
gap: 20px;
flex-wrap: wrap;
}

.nav-link {
color: var(--text-white);
text-decoration: none;
padding: 8px 16px;
border-radius: var(--radius-sm);
transition: var(--transition);
display: flex;
align-items: center;
gap: 8px;
}

.nav-link:hover,
.nav-link.active {
background: rgba(255, 255, 255, 0.2);
}

.nav-user {
display: flex;
align-items: center;
gap: 10px;
color: var(--text-white);
padding: 8px 16px;
background: rgba(255, 255, 255, 0.15);
border-radius: var(--radius-sm);
}

/* ===== Container ===== */
.container {
max-width: 900px;
margin: 0 auto;
padding: 20px;
}

.page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
flex-wrap: wrap;
gap: 15px;
}

.page-header h1 {
color: var(--text-white);
font-size: 32px;
display: flex;
align-items: center;
gap: 12px;
}

/* ===== Filters ===== */
.filters {
padding: 20px;
margin-bottom: 30px;
display: flex;
align-items: center;
gap: 20px;
flex-wrap: wrap;
}

.filter-group {
display: flex;
align-items: center;
gap: 10px;
color: var(--text-white);
}

.filter-group select {
padding: 8px 16px;
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: var(--radius-sm);
color: var(--text-white);
cursor: pointer;
max-width: 100%;
}

.checkbox-label {
display: flex;
align-items: center;
gap: 8px;
color: var(--text-white);
cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
}

/* ===== Books Grid ===== */
.books-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 20px;
}

.book-card {
padding: 20px;
transition: var(--transition);
}

.book-card:hover {
transform: translateY(-5px);
}

.book-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 15px;
gap: 10px;
}

.book-header h3 {
color: var(--text-white);
font-size: 20px;
flex: 1;
word-wrap: break-word;
}

.book-actions {
display: flex;
gap: 5px;
flex-shrink: 0;
}

.book-author {
color: var(--text-white-muted);
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 8px;
}

.book-progress {
margin-bottom: 15px;
}

.progress-bar {
height: 8px;
background: rgba(255, 255, 255, 0.2);
border-radius: 4px;
overflow: hidden;
margin-bottom: 8px;
}

.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--success), #4a7d5c);
transition: width 0.3s;
}

.progress-text {
color: var(--text-white);
font-size: 14px;
}

.book-stats {
display: flex;
flex-wrap: wrap;
gap: 15px;
margin-bottom: 15px;
padding: 15px 0;
border-top: 1px solid rgba(255, 255, 255, 0.2);
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
display: flex;
align-items: center;
gap: 8px;
color: var(--text-white);
font-size: 14px;
}

.stat-item i {
color: var(--text-white-light);
}

.book-footer {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}

.page-update {
display: flex;
gap: 8px;
flex: 1;
min-width: 0;
}

.page-input {
flex: 1;
min-width: 0;
padding: 8px 12px;
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: var(--radius-sm);
color: var(--text-white);
text-align: center;
font-family: var(--font-arabic);
}

/* ===== Targets ===== */
.targets-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 20px;
}

.target-card {
padding: 25px;
}

.target-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
gap: 10px;
}

.target-header h3 {
color: var(--text-white);
font-size: 22px;
display: flex;
align-items: center;
gap: 10px;
}

.target-stats .stat-item {
flex-direction: column;
align-items: stretch;
margin-bottom: 20px;
}

.stat-header {
display: flex;
align-items: center;
gap: 8px;
color: var(--text-white);
margin-bottom: 10px;
font-weight: 600;
}

.stat-numbers {
color: var(--text-white);
font-size: 18px;
font-weight: 600;
text-align: center;
margin-top: 8px;
}

.stat-value {
color: var(--text-white);
font-size: 24px;
font-weight: 700;
text-align: center;
}

.no-target {
text-align: center;
padding: 40px 20px;
color: var(--text-white);
}

.no-target i {
font-size: 48px;
margin-bottom: 15px;
opacity: 0.7;
}

.no-target p {
margin-bottom: 20px;
font-size: 16px;
}

/* ===== Modal ===== */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(5px);
z-index: 1000;
align-items: center;
justify-content: center;
padding: 20px;
}

.modal.active {
display: flex;
}

.modal-content {
width: 100%;
max-width: 500px;
max-height: 90vh;
overflow-y: auto;
padding: 30px;
}

.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
gap: 15px;
}

.modal-header h2 {
color: var(--text-white);
font-size: 24px;
display: flex;
align-items: center;
gap: 10px;
}

.modal-actions {
display: flex;
gap: 10px;
margin-top: 25px;
flex-wrap: wrap;
}

.modal-actions .btn {
flex: 1;
min-width: 120px;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
.hero-title {
font-size: 36px;
}

.hero-subtitle {
    font-size: 16px;
}

.hero-buttons {
    flex-direction: column;
    width: 100%;
}

.hero-buttons .btn {
    width: 100%;
}

.landing-hero {
    padding: 50px 30px;
}

.hero-logo {
    height: 60px;
}

.nav-logo {
    height: 28px;
}

.auth-logo {
    height: 50px;
}

.nav-container {
    flex-direction: column;
}

.nav-menu {
    width: 100%;
    justify-content: space-around;
}

.books-grid {
    grid-template-columns: 1fr;
}

.targets-grid {
    grid-template-columns: 1fr;
}

.page-header {
    flex-direction: column;
    align-items: stretch;
}

.page-header .btn {
    width: 100%;
    justify-content: center;
}

.book-footer {
    flex-direction: column;
    align-items: stretch;
}

.page-update {
    width: 100%;
}

.btn-timer {
    width: 100%;
}

.modal-actions {
    flex-direction: column;
}

.modal-actions .btn {
    width: 100%;
}

/* Fix input width on mobile */
.form-group input,
.form-group select,
.form-group textarea,
.page-input,
.filter-group select {
    max-width: 100%;
    width: 100%;
}

.book-header {
    flex-wrap: wrap;
}

.filters {
    flex-direction: column;
    align-items: stretch;
}

.filter-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
}

.filter-group select {
    width: 100%;
}
}

@media (max-width: 480px) {
.landing-hero {
padding: 40px 20px;
}

.hero-title {
    font-size: 32px;
}

.hero-logo {
    height: 50px;
}

.nav-logo {
    height: 24px;
}

.auth-logo {
    height: 45px;
}

.auth-card {
    padding: 30px 20px;
}

.modal-content {
    padding: 25px 20px;
}

.navbar {
    margin: 15px;
    padding: 12px 20px;
}

.nav-brand {
    font-size: 20px;
}

.nav-brand i {
    font-size: 24px;
}

/* Ensure no horizontal overflow */
body {
    overflow-x: hidden;
}

.landing-container,
.auth-container,
.container {
    max-width: 100%;
    padding: 15px;
}
}

/* ===== Print Styles ===== */
@media print {
.navbar,
.hero-buttons,
.btn,
.social-links {
display: none;
}

.glass-card {
    border: 1px solid #ccc;
    box-shadow: none;
}
}


/* إضافة هذه الأنماط في نهاية ملف style.css */

/* ===== Footer في صفحات Auth ===== */
.auth-page .landing-footer {
    margin-top: 30px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

/* تأكد أن Footer يظهر بشكل صحيح */
.landing-footer {
    text-align: center;
    color: var(--text-white);
}

.landing-footer .footer-content {
    color: var(--text-white);
    font-size: 16px;
}

.landing-footer .footer-content p {
    margin-bottom: 20px;
    font-weight: 300;
}

.landing-footer .footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.landing-footer .footer-links a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition-fast);
    opacity: 0.9;
}

.landing-footer .footer-links a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.landing-footer .social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.landing-footer .social-links a {
    color: var(--text-white);
    font-size: 22px;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.landing-footer .social-links a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
}


/* ===== أنماط تسجيل الدخول المحسنة ===== */

/* خيارات النموذج (تذكرني + نسيت كلمة المرور) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

/* تذكرني - Checkbox */
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-white);
    cursor: pointer;
    font-size: 14px;
    margin: 0;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--text-white);
}

.remember-me span {
    user-select: none;
}

/* رابط نسيت كلمة المرور */
.forgot-password-link {
    color: var(--text-white);
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.forgot-password-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* تحسين رسائل الخطأ */
.alert {
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert i {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-error {
    background: rgba(139, 33, 25, 0.3);
    color: var(--text-white);
    border: 1px solid rgba(139, 33, 25, 0.5);
}

.alert-success {
    background: rgba(57, 99, 75, 0.3);
    color: var(--text-white);
    border: 1px solid rgba(57, 99, 75, 0.5);
}

.alert-success a {
    color: var(--text-white);
    text-decoration: underline;
}

/* تحسين placeholder للحقول */
.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* Responsive للخيارات */
@media (max-width: 480px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .forgot-password-link {
        margin-left: auto;
    }
}

/* ===== صفحات الشروط والأحكام وسياسة الخصوصية ===== */

.legal-page {
    max-width: 120px;
    margin: 20px auto;
    padding: 40px;
    color: var(--text-white);
}

.legal-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.legal-header h1 {
    font-size: 36px;
    margin: 20px 0 10px;
    color: var(--text-white);
}

.last-updated {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 10px 0 0;
}

.legal-content {
    line-height: 1.8;
    color: var(--text-white);
}

.legal-content section {
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 24px;
    color: var(--text-white);
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-content h3 {
    font-size: 18px;
    color: var(--text-white);
    margin: 20px 0 10px;
    font-weight: 600;
}

.legal-content p {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.legal-content ul {
    margin: 15px 0;
    padding-right: 30px;
    list-style-type: disc;
}

.legal-content li {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.legal-content a {
    color: var(--text-white);
    text-decoration: underline;
    transition: var(--transition-fast);
}

.legal-content a:hover {
    opacity: 0.8;
}

.legal-content strong {
    font-weight: 600;
    color: var(--text-white);
}

.legal-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Checkbox الموافقة على الشروط في صفحة التسجيل ===== */

.terms-checkbox {
    margin: 25px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
}

.terms-checkbox .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-white);
    cursor: pointer;
    margin: 0;
    line-height: 1.6;
}

.terms-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--text-white);
    flex-shrink: 0;
    margin-top: 2px;
}

.terms-checkbox span {
    user-select: none;
    font-size: 14px;
}

.terms-link {
    color: var(--text-white);
    text-decoration: underline;
    font-weight: 600;
    transition: var(--transition-fast);
}

.terms-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* تلميح صغير تحت حقل كلمة المرور */
.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* تحسين رسالة النجاح */
.alert-success p {
    margin: 0;
}

.alert-success a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.alert-success a:hover {
    opacity: 0.9;
}

/* Responsive للصفحات القانونية */
@media (max-width: 768px) {
    .legal-page {
        padding: 30px 20px;
    }
    
    .legal-header h1 {
        font-size: 28px;
    }
    
    .legal-content h2 {
        font-size: 20px;
    }
    
    .legal-content h3 {
        font-size: 16px;
    }
    
    .legal-content ul {
        padding-right: 20px;
    }
    
    .legal-footer {
        flex-direction: column;
    }
    
    .legal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .legal-page {
        padding: 20px 15px;
    }
    
    .legal-header h1 {
        font-size: 24px;
    }
    
    .terms-checkbox {
        padding: 12px;
    }
    
    .terms-checkbox .checkbox-label {
        font-size: 13px;
    }
}

/* ===== صفحات الشروط والأحكام وسياسة الخصوصية ===== */

.legal-page {
    max-width: 900px;
    margin: 20px auto;
    padding: 40px;
    color: var(--text-white);
}

.legal-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.legal-header h1 {
    font-size: 36px;
    margin: 20px 0 10px;
    color: var(--text-white);
}

.last-updated {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 10px 0 0;
}

.legal-content {
    line-height: 1.8;
    color: var(--text-white);
}

.legal-content section {
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 24px;
    color: var(--text-white);
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-content h3 {
    font-size: 18px;
    color: var(--text-white);
    margin: 20px 0 10px;
    font-weight: 600;
}

.legal-content p {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.legal-content ul {
    margin: 15px 0;
    padding-right: 30px;
    list-style-type: disc;
}

.legal-content li {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.legal-content a {
    color: var(--text-white);
    text-decoration: underline;
    transition: var(--transition-fast);
}

.legal-content a:hover {
    opacity: 0.8;
}

.legal-content strong {
    font-weight: 600;
    color: var(--text-white);
}

.legal-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Checkbox الموافقة على الشروط في صفحة التسجيل ===== */

.terms-checkbox {
    margin: 25px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
}

.terms-checkbox .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-white);
    cursor: pointer;
    margin: 0;
    line-height: 1.6;
}

.terms-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--text-white);
    flex-shrink: 0;
    margin-top: 2px;
}

.terms-checkbox span {
    user-select: none;
    font-size: 14px;
}

.terms-link {
    color: var(--text-white);
    text-decoration: underline;
    font-weight: 600;
    transition: var(--transition-fast);
}

.terms-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* تلميح صغير تحت حقل كلمة المرور */
.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* تحسين رسالة النجاح */
.alert-success p {
    margin: 0;
}

.alert-success a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.alert-success a:hover {
    opacity: 0.9;
}

/* Responsive للصفحات القانونية */
@media (max-width: 768px) {
    .legal-page {
        padding: 30px 20px;
    }
    
    .legal-header h1 {
        font-size: 28px;
    }
    
    .legal-content h2 {
        font-size: 20px;
    }
    
    .legal-content h3 {
        font-size: 16px;
    }
    
    .legal-content ul {
        padding-right: 20px;
    }
    
    .legal-footer {
        flex-direction: column;
    }
    
    .legal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .legal-page {
        padding: 20px 15px;
    }
    
    .legal-header h1 {
        font-size: 24px;
    }
    
    .terms-checkbox {
        padding: 12px;
    }
    
    .terms-checkbox .checkbox-label {
        font-size: 13px;
    }
}

/* ===== تحسينات Navbar للموبايل ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }
    
    .navbar-brand {
        font-size: 16px;
        gap: 8px;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-links {
        gap: 5px;
    }
    
    .navbar-links a {
        font-size: 0;
        padding: 8px 12px;
    }
    
    .navbar-links a i {
        font-size: 18px;
        margin: 0;
    }
    
    .navbar-user {
        position: relative;
    }
    
    .user-menu-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        background: rgba(255, 255, 255, 0.1);
        padding: 8px 12px;
        border-radius: var(--radius-sm);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: var(--text-white);
        cursor: pointer;
        transition: var(--transition-fast);
    }
    
    .user-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.15);
    }
    
    .user-menu-toggle i {
        font-size: 18px;
    }
    
    .user-name {
        display: none;
    }
    
    .user-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 10px;
        background: var(--card-bg);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: var(--radius-sm);
        padding: 10px;
        min-width: 200px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        display: none;
        z-index: 1000;
    }
    
    .user-dropdown.show {
        display: block;
    }
    
    .user-dropdown a,
    .user-dropdown form {
        display: block;
        padding: 10px 15px;
        color: var(--text-white);
        text-decoration: none;
        border-radius: var(--radius-sm);
        transition: var(--transition-fast);
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .user-dropdown a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .user-dropdown button {
        width: 100%;
        text-align: right;
        background: none;
        border: none;
        color: var(--text-white);
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
    }
}

/* ===== كاردات الكتب المبسطة ===== */
.book-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.book-card .book-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.book-card .book-header h3 {
    font-size: 18px;
    margin: 0 0 5px 0;
    color: var(--text-white);
}

.book-card .book-author {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.book-card .book-actions {
    display: flex;
    gap: 5px;
}

.book-card .book-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.book-card .progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.book-card .book-footer {
    margin-top: auto;
}

.btn-timer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-weight: 600;
}

.btn-timer.active {
    background: var(--danger);
}

.btn-timer.active:hover {
    background: #dc2626;
}

/* ===== Empty State ===== */
.empty-state {
    padding: 60px 40px;
    text-align: center;
    grid-column: 1/-1;
}

.empty-state i {
    font-size: 64px;
    color: white;
    opacity: 0.5;
    margin-bottom: 20px;
    display: block;
}

.empty-state h3 {
    color: white;
    margin-bottom: 10px;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== Timer Modal ===== */
.timer-modal {
    max-width: 500px;
}

.timer-display {
    text-align: center;
    padding: 40px 20px;
}

.timer-circle {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.timer-circle i {
    font-size: 48px;
    color: var(--text-white);
}

.timer-time {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-white);
    font-family: 'Courier New', monospace;
}

.timer-controls {
    padding: 20px;
}

.timer-page-update {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.timer-page-update label {
    display: block;
    color: var(--text-white);
    margin-bottom: 10px;
    font-weight: 600;
}

.page-input-group {
    display: flex;
    gap: 10px;
}

.page-input-group input {
    flex: 1;
}

/* ===== Profile Grid ===== */
.profile-grid {
    display: grid;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.profile-grid .glass-card {
    padding: 25px;
}

.profile-grid .glass-card h3 {
    color: var(--text-white);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.danger-zone {
    border: 2px solid var(--danger);
}

.danger-zone h3 {
    color: var(--danger);
}

.danger-zone p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .timer-circle {
        width: 200px;
        height: 200px;
    }
    
    .timer-time {
        font-size: 28px;
    }
    
    .timer-circle i {
        font-size: 36px;
    }
}
/* ===== Navbar محسّن مع User Dropdown ===== */
/* أضف هذا في نهاية style.css */

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-white);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.navbar-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.navbar-links a {
    color: var(--text-white);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-links a:hover,
.navbar-links a.active {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-links a i {
    font-size: 18px;
}

.navbar-user {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-arabic);
    font-size: 15px;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: rgba(20, 50, 87, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown a,
.user-dropdown form {
    display: block;
    margin: 0;
}

.user-dropdown a,
.user-dropdown button {
    width: 100%;
    padding: 12px 15px;
    color: var(--text-white);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-arabic);
    font-size: 14px;
    text-align: right;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-dropdown i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* ===== Responsive للموبايل ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 15px;
    }
    
    .navbar-container {
        gap: 10px;
    }
    
    .navbar-brand {
        font-size: 16px;
        gap: 8px;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-links {
        gap: 5px;
    }
    
    .navbar-links a span {
        display: none; /* إخفاء النصوص، الأيقونات فقط */
    }
    
    .navbar-links a {
        padding: 8px 12px;
    }
    
    .navbar-links a i {
        margin: 0;
        font-size: 18px;
    }
    
    .user-menu-toggle {
        padding: 8px 12px;
    }
    
    .user-name {
        display: none; /* إخفاء اسم المستخدم على الموبايل */
    }
    
    .user-dropdown {
        left: auto;
        right: 0;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 10px 12px;
    }
    
    .navbar-brand span {
        display: none; /* إخفاء "متتبع القراءة" على الشاشات الصغيرة جداً */
    }
}

/* ===== تحسينات Navbar للموبايل ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }
    
    .navbar-brand {
        font-size: 16px;
        gap: 8px;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-links {
        gap: 5px;
    }
    
    .navbar-links a {
        font-size: 0;
        padding: 8px 12px;
    }
    
    .navbar-links a i {
        font-size: 18px;
        margin: 0;
    }
    
    .navbar-user {
        position: relative;
    }
    
    .user-menu-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        background: rgba(255, 255, 255, 0.1);
        padding: 8px 12px;
        border-radius: var(--radius-sm);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: var(--text-white);
        cursor: pointer;
        transition: var(--transition-fast);
    }
    
    .user-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.15);
    }
    
    .user-menu-toggle i {
        font-size: 18px;
    }
    
    .user-name {
        display: none;
    }
    
    .user-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 10px;
        background: var(--card-bg);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: var(--radius-sm);
        padding: 10px;
        min-width: 200px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        display: none;
        z-index: 1000;
    }
    
    .user-dropdown.show {
        display: block;
    }
    
    .user-dropdown a,
    .user-dropdown form {
        display: block;
        padding: 10px 15px;
        color: var(--text-white);
        text-decoration: none;
        border-radius: var(--radius-sm);
        transition: var(--transition-fast);
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .user-dropdown a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .user-dropdown button {
        width: 100%;
        text-align: right;
        background: none;
        border: none;
        color: var(--text-white);
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
    }
}

/* ===== كاردات الكتب المبسطة ===== */
.book-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.book-card .book-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.book-card .book-header h3 {
    font-size: 18px;
    margin: 0 0 5px 0;
    color: var(--text-white);
}

.book-card .book-author {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.book-card .book-actions {
    display: flex;
    gap: 5px;
}

.book-card .book-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.book-card .progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.book-card .book-footer {
    margin-top: auto;
}

.btn-timer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-weight: 600;
}

.btn-timer.active {
    background: var(--danger);
}

.btn-timer.active:hover {
    background: #dc2626;
}

/* ===== Empty State ===== */
.empty-state {
    padding: 60px 40px;
    text-align: center;
    grid-column: 1/-1;
}

.empty-state i {
    font-size: 64px;
    color: white;
    opacity: 0.5;
    margin-bottom: 20px;
    display: block;
}

.empty-state h3 {
    color: white;
    margin-bottom: 10px;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== Timer Modal ===== */
.timer-modal {
    max-width: 500px;
}

.timer-display {
    text-align: center;
    padding: 40px 20px;
}

.timer-circle {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.timer-circle i {
    font-size: 48px;
    color: var(--text-white);
}

.timer-time {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-white);
    font-family: 'Courier New', monospace;
}

.timer-controls {
    padding: 20px;
}

.timer-page-update {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.timer-page-update label {
    display: block;
    color: var(--text-white);
    margin-bottom: 10px;
    font-weight: 600;
}

.page-input-group {
    display: flex;
    gap: 10px;
}

.page-input-group input {
    flex: 1;
}

/* ===== Profile Grid ===== */
.profile-grid {
    display: grid;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.profile-grid .glass-card {
    padding: 25px;
}

.profile-grid .glass-card h3 {
    color: var(--text-white);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.danger-zone {
    border: 2px solid var(--danger);
}

.danger-zone h3 {
    color: var(--danger);
}

.danger-zone p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .timer-circle {
        width: 200px;
        height: 200px;
    }
    
    .timer-time {
        font-size: 28px;
    }
    
    .timer-circle i {
        font-size: 36px;
    }
}

/* ===== Navbar Container ===== */
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-white);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.navbar-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.navbar-links a {
    color: var(--text-white);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-links a:hover,
.navbar-links a.active {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-links a i {
    font-size: 18px;
}

/* ===== User Menu ===== */
.navbar-user {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-arabic);
    font-size: 15px;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: rgba(20, 50, 87, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown a,
.user-dropdown form {
    display: block;
    margin: 0;
}

.user-dropdown a,
.user-dropdown button {
    width: 100%;
    padding: 12px 15px;
    color: var(--text-white);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-arabic);
    font-size: 14px;
    text-align: right;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-dropdown i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* ===== Responsive للموبايل ===== */
@media (max-width: 768px) {
    .navbar-container {
        gap: 10px;
    }
    
    .navbar-brand {
        font-size: 16px;
        gap: 8px;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-links {
        gap: 5px;
    }
    
    .navbar-links a span {
        display: none;
    }
    
    .navbar-links a {
        padding: 8px 12px;
    }
    
    .navbar-links a i {
        margin: 0;
        font-size: 18px;
    }
    
    .user-menu-toggle {
        padding: 8px 12px;
    }
    
    .user-name {
        display: none;
    }
    
    .user-dropdown {
        left: auto;
        right: 0;
    }
}

/* ===== Modal System ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.modal-header h2 {
    color: var(--text-white);
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== Timer Modal ===== */
.timer-modal {
    max-width: 500px;
}

.timer-display {
    text-align: center;
    padding: 40px 20px;
}

.timer-circle {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.timer-circle i {
    font-size: 48px;
    color: var(--text-white);
}

.timer-time {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-white);
    font-family: 'Courier New', monospace;
}

.timer-controls {
    padding: 20px;
}

.timer-page-update {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.timer-page-update label {
    display: block;
    color: var(--text-white);
    margin-bottom: 10px;
    font-weight: 600;
}

.page-input-group {
    display: flex;
    gap: 10px;
}

.page-input-group input {
    flex: 1;
}

@media (max-width: 480px) {
    .timer-circle {
        width: 200px;
        height: 200px;
    }
    
    .timer-time {
        font-size: 28px;
    }
    
    .timer-circle i {
        font-size: 36px;
    }
}