/* assets/css/style.css */
:root {
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --primary-color: #08415c;
    --green: #34c759;
    --orange: #ff9500;
    --text-color: #1c1c1e;
    --text-light: #8e8e93;
    --border-color: #e5e5ea;
}

/* === Mobil Optimizasyonları === */
* {
    -webkit-tap-highlight-color: transparent; /* iOS tap highlight'ı kaldır */
    -webkit-touch-callout: none; /* iOS long press menüsünü kaldır */
}

html {
    /* Safe area support (notch için) */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    /* Mobil cihazlarda "sıçramayı" engelle */
    overscroll-behavior-y: contain;
    /* Touch action optimizasyonu */
    touch-action: pan-y;
    /* Text size adjust (iOS için) */
    -webkit-text-size-adjust: 100%;
    /* Smooth scrolling */
    -webkit-overflow-scrolling: touch;
}

/* --- Auth Sayfası --- */
.auth-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 25px 20px;
    padding-top: calc(25px + env(safe-area-inset-top, 0));
    padding-bottom: calc(25px + env(safe-area-inset-bottom, 0));
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}
/* Logo stilleri */
.auth-logo {
    margin-bottom: 20px;
    text-align: center;
}
.logo-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.auth-container h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}
.auth-container > p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1rem;
}
.auth-container form {
    margin-top: 0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.auth-container input[type="text"],
.auth-container input[type="email"],
.auth-container input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background-color: var(--card-bg);
    min-height: 50px; /* Touch target */
    color: var(--text-color);
}
.auth-container input[type="text"]::placeholder,
.auth-container input[type="password"]::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}
.auth-container input[type="text"]:focus,
.auth-container input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(8, 65, 92, 0.1);
    transform: translateY(-1px);
}
.auth-container input[type="text"]:hover:not(:focus),
.auth-container input[type="password"]:hover:not(:focus) {
    border-color: rgba(8, 65, 92, 0.3);
}
.auth-container button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    min-height: 52px; /* Touch target */
    border: none;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(8, 65, 92, 0.25);
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}
.auth-container button[type="submit"]:hover {
    background-color: #0a5a7a;
    box-shadow: 0 4px 12px rgba(8, 65, 92, 0.35);
    transform: translateY(-1px);
}
.auth-container button[type="submit"]:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 4px rgba(8, 65, 92, 0.4);
}
.auth-container button[type="submit"]:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}
.auth-container button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* --- Auth Sayfası Tabları --- */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 25px;
    gap: 0;
}
.auth-tab-btn {
    flex: 1; /* Eşit genişlik */
    background: none;
    border: none;
    padding: 10px 16px;
    min-height: 44px; /* Daha küçük touch target */
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px; /* Border'ı alttaki çizgiyle birleştirmek için */
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}
.auth-tab-btn:active {
    background-color: rgba(8, 65, 92, 0.08);
}
.auth-tab-btn.active {
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color);
    font-weight: 700;
    background-color: rgba(8, 65, 92, 0.05); /* Hafif background */
}
/* --- AUTH TABLARI BİTTİ --- */

.error {
    color: #ff3b30;
    margin-top: 15px;
    padding: 12px;
    background-color: rgba(255, 59, 48, 0.1);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Mobil için auth container ayarları */
@media (max-width: 480px) {
    .auth-container {
        margin: 20px 15px;
        padding: 20px 18px;
        padding-top: calc(20px + env(safe-area-inset-top, 0));
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
        border-radius: 12px;
    }
    .auth-container h1 {
        font-size: 2rem;
    }
    .logo-img {
        max-width: 220px;
    }
    .header-logo-img {
        max-width: 100px;
        height: 35px;
    }
    .auth-tab-btn {
        padding: 8px 12px;
        min-height: 42px;
        font-size: 0.9rem;
    }
    .auth-container input[type="text"],
    .auth-container input[type="password"] {
        padding: 12px 14px;
        min-height: 48px;
        font-size: 0.95rem;
    }
    .auth-container button[type="submit"] {
        padding: 12px 18px;
        min-height: 50px;
        font-size: 0.95rem;
    }
}

/* --- Ana Uygulama --- */
.app-wrapper {
    max-width: 500px; /* Mobil odaklı genişlik */
    margin: 0 auto;
    padding: 15px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom)); /* Safe area için */
    min-height: 100vh;
    box-sizing: border-box;
}

/* Mobil için padding ayarı */
@media (max-width: 480px) {
    .app-wrapper {
        padding: 15px;
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }
    .app-header {
        margin-bottom: 10px;
    }
    .welcome-section {
        margin-bottom: 15px;
    }
}

/* Header */
.app-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    margin-bottom: 15px;
    padding-top: 0; /* html padding zaten safe area'yı handle ediyor */
    gap: 12px;
    width: 100%;
}
.header-home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}
.header-home-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-color);
    transition: stroke 0.2s ease;
}
.header-home-btn:active,
.header-home-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.header-home-btn:active svg,
.header-home-btn:hover svg {
    stroke: var(--primary-color);
}
.header-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}
.header-logo-img {
    max-width: 120px;
    width: auto;
    height: 40px;
    display: block;
    object-fit: contain;
}

/* Welcome Section (Merhaba mesajı) */
.welcome-section {
    margin-bottom: 20px;
    margin-top: 0;
    text-align: center;
}
.welcome-section h1 {
    font-size: clamp(1.5rem, 4vw, 1.9rem);
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
}
.welcome-user-info {
    color: var(--text-light);
    margin-top: 5px;
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .welcome-section h1 {
        font-size: 1.5rem;
    }
    .header-logo-img {
        max-width: 100px;
        height: 35px;
    }
    .header-home-btn svg,
    .profile-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* --- YENİ: Profil Menüsü --- */
.profile-menu-container {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.profile-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.profile-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-color);
    transition: stroke 0.2s ease;
}
.profile-btn:active,
.profile-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.profile-btn:active svg,
.profile-btn:hover svg {
    stroke: var(--primary-color);
}

.profile-dropdown {
    /* display: none; -> JS ile yönetiliyor */
    position: absolute;
    top: 120%; /* Butonun biraz altı */
    right: 0;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 200;
    width: 150px;
    overflow: hidden; /* Köşeleri yuvarlak tutar */
}

.profile-dropdown a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
}
.profile-dropdown a:hover {
    background-color: var(--bg-color);
}
/* Çıkış linki kırmızı olsun */
.profile-dropdown a[href*="logout.php"] {
    color: #ff3b30; 
    border-top: 1px solid var(--border-color);
}
/* Back link (welcome section içinde) */
.welcome-section .back-link {
    font-size: 0.95rem;
    padding: 8px 16px;
    margin-top: 12px;
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.welcome-section .back-link:hover {
    background-color: rgba(8, 65, 92, 0.05);
}
.welcome-section .back-link:active {
    transform: scale(0.98);
}
/* --- PROFİL MENÜSÜ BİTTİ --- */

/* Dashboard */
#dashboard {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-top: 30px;
    margin-bottom: 20px;
}
.stats-summary {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}
.stat-item {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    border-radius: 0;
    padding: 8px 0;
    text-align: left;
    transition: all 0.2s ease;
}
.stat-item.stat-learned {
    border-bottom-color: var(--green);
}
.stat-item.stat-studying {
    border-bottom-color: var(--orange);
}
.stat-item h3 {
    margin: 0 0 2px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
}
.stat-item p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.stat-item h3.green { 
    color: var(--green);
}
.stat-item h3.orange { 
    color: var(--orange);
}

.stats-detail {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}
.stats-detail p {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin: 8px 0;
}
.stats-detail span {
    font-weight: 600;
}
.level-stat-container {
    margin-bottom: 12px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}
.level-stat-container:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.level-stat-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    padding-left: 0;
}
.level-stat-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.level-stat-card {
    background: transparent;
    border: none;
    border-left: 2px solid var(--border-color);
    border-radius: 0;
    padding: 4px 0 4px 10px;
    text-align: left;
    min-height: auto;
    display: flex;
    align-items: center;
    transition: none;
}
.level-stat-card.learned {
    border-left-color: var(--green);
}
.level-stat-card.studying {
    border-left-color: var(--orange);
}
.level-stat-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}
.level-stat-card.learned .level-stat-number {
    color: var(--green);
}
.level-stat-card.studying .level-stat-number {
    color: var(--orange);
}

/* Tamamlandı Mesajı Butonu */
.btn-back-home {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease, transform 0.1s ease;
    min-height: 48px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
.btn-back-home:hover {
    background: #063a4f;
}
.btn-back-home:active {
    transform: scale(0.95);
}

/* Seviye Seçim */
#level-selector {
    margin: 20px 0;
}
#level-selector h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.level-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.level-options label {
    flex-grow: 1;
    text-align: center;
    padding: 14px 16px; /* Daha büyük touch target */
    min-height: 44px; /* Minimum touch target */
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    user-select: none;
    -webkit-user-select: none;
}
.level-options label:active {
    transform: scale(0.95);
}
.level-options input[type="checkbox"] {
    display: none; /* Checkbox'ı gizle */
}
/* Seçili olunca */
.level-options input[type="checkbox"]:checked + label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Çalışma Butonları */
.study-actions {
    margin-top: 20px;
    display: grid;
    gap: 12px;
    padding-bottom: env(safe-area-inset-bottom, 0); /* Safe area için */
}
.study-actions button {
    width: 100%;
    padding: 18px 20px; /* Daha büyük touch target */
    min-height: 56px; /* Minimum touch target (Apple HIG) */
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}
.study-actions button:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.study-actions button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
button.start-new {
    background-color: var(--primary-color);
    color: white;
}
button.review-keep {
    background-color: var(--orange);
    color: white;
}
button.review-learned {
    background-color: var(--green);
    color: white;
}

/* --- Çalışma Ekranı (Flashcard) --- */
#study-screen {
    display: none; /* Başlangıçta gizli */
    position: fixed; /* Tam ekran kaplama */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.card-wrapper {
    width: 100%;
    max-width: 450px;
    perspective: 1000px;
}

.flashcard {
    width: 100%;
    min-height: 300px;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
    touch-action: pan-y pinch-zoom; /* Swipe için */
    user-select: none;
    -webkit-user-select: none;
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: var(--card-bg);
    border-radius: 18px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 25px;
    box-sizing: border-box;
    text-align: center;
}

.card-face.card-back {
    transform: rotateY(180deg);
}

.flashcard.is-flipped {
    transform: rotateY(180deg);
}

/* Kart İçeriği */
.word {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.2;
    transition: font-size 0.3s ease;
}
.pos { /* Part of speech - kelime türü */
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
}
.translation {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}
.type-tr {
    font-size: 1.1rem;
    color: var(--text-light);
}

.card-back .description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    text-align: left;
    max-width: 100%;
}

/* Kart Aksiyonları */
.card-actions {
    display: none; /* Cevabı görünce açılacak */
    margin-top: 30px;
    width: 100%;
    max-width: 450px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.action-button-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.card-actions button {
    border: none;
    border-radius: 50%;
    width: 90px; /* Daha büyük touch target */
    height: 90px;
    min-width: 90px;
    min-height: 90px;
    font-size: 2.8rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.action-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    font-weight: 500;
    max-width: 100px;
    line-height: 1.2;
}
.card-actions button:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.card-actions button:focus {
    outline: 3px solid rgba(8, 65, 92, 0.3);
    outline-offset: 2px;
}
button#btn-keep-studying {
    background-color: #fff0e6;
    color: var(--orange);
}
button#btn-learned {
    background-color: #e5f9e9;
    color: var(--green);
}
button#btn-show-answer {
    background-color: #e6f0ff;
    color: var(--primary-color);
}
button#btn-learned-front {
    background-color: #e5f9e9;
    color: var(--green);
}


/* Yükleniyor... */
.loader {
    font-size: 1.5rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.loader::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pull to refresh indicator */
.pull-to-refresh {
    text-align: center;
    padding: 12px;
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.pull-to-refresh.active {
    opacity: 1;
    transform: translateY(0);
}

/* Toast animasyonları */
@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
}

/* Çıkış butonu */
#exit-study {
    position: absolute;
    top: calc(20px + env(safe-area-inset-top, 0)); /* Safe area için */
    left: calc(20px + env(safe-area-inset-left, 0));
    font-size: 2rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    width: 48px; /* Touch target */
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}
#exit-study:active {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
}

/* === Footer === */
.app-footer {
    margin-top: 40px;
    padding: 20px 15px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.app-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.app-footer-links a {
    color: var(--text-light);
    text-decoration: none;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.app-footer-links a:hover,
.app-footer-links a:active {
    color: var(--primary-color);
}

.app-footer-copyright {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 8px;
}

/* === İlk Kullanım Tips === */
.tips-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.tips-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px 20px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    text-align: center;
}
.tips-content h3 {
    font-size: 1.5rem;
    margin: 0 0 20px 0;
    color: var(--primary-color);
}
.tips-content p {
    margin: 0 0 20px 0;
    line-height: 1.6;
    color: var(--text-color);
    text-align: left;
}
.tips-buttons-demo {
    margin: 20px 0;
    text-align: left;
}
.tips-button-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
}
.tips-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}
.tips-button-item span:last-child {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
}
.tips-next {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 48px;
}
.tips-next:hover,
.tips-next:active {
    background: #063a4f;
}

@media (max-width: 480px) {
    .app-footer {
        padding: 15px 12px;
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }
    
    .app-footer-links {
        gap: 12px;
        font-size: 0.8rem;
    }
    
    .app-footer-copyright {
        font-size: 0.7rem;
    }
    
    .tips-overlay {
        padding: 15px;
    }
    
    .tips-content {
        padding: 20px 15px;
    }
    
    .tips-content h3 {
        font-size: 1.3rem;
    }
    
    .action-label {
        font-size: 0.75rem;
    }
    
    .level-stat-container {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .level-stat-header {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .level-stat-cards {
        gap: 10px;
    }
    
    .level-stat-card {
        padding: 12px;
        min-height: 65px;
    }
    
    .level-stat-number {
        font-size: 1.6rem;
    }
    
    .level-stat-label {
        font-size: 0.8rem;
    }
    
    .stats-summary {
        gap: 6px;
    }
    
    .stat-item {
        padding: 6px 0;
    }
    
    .stat-item h3 {
        font-size: 1.2rem;
    }
    
    .stat-item p {
        font-size: 0.7rem;
    }
    
    .level-stat-container {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    
    .level-stat-header {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .level-stat-cards {
        gap: 6px;
    }
    
    .level-stat-card {
        padding: 5px 0 5px 8px;
    }
    
    .level-stat-number {
        font-size: 1rem;
    }
    
    .level-stat-label {
        font-size: 0.65rem;
    }
}