/* Theme variables */
:root {
    --bg-start: #fdf2f8; /* pastel pink tint */
    --bg-mid: #f9fafb;   /* near-white */
    --bg-end: #eef2ff;   /* soft lavender tint */

    --accent: #ff6aa2;        /* pink accent */
    --accent-2: #ff85c1;      /* lighter pink */
    --accent-shadow: rgba(255, 106, 162, 0.15);

    --text: #333;
    --muted: #666;
    --card-bg: #ffffff;

    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
}
/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Floating Background Elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.2)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.2)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.2)"/></svg>');
    pointer-events: none;
    z-index: 0;
}

/* Cute cat gif overlay */
/* Removed cute cat overlay per request */

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 1s ease-out;
}

.header-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.nav-tab {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 15px 30px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

/* Statistics Widget */
.stats-widget {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.stat-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Card */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideInUp 0.8s ease-out;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-header p {
    color: #666;
    font-size: 1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-group label i {
    color: var(--accent);
    width: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-shadow);
    background: white;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

/* Buttons */
.submit-btn,
.search-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
}

.submit-btn:hover,
.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:active,
.search-btn:active {
    transform: translateY(0);
}

/* Search Results */
.search-results {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.letter-display h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.letter-content,
.response-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent);
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.no-response {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Floating Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-heart,
.floating-star {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-heart:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-star:nth-child(2) {
    top: 30%;
    right: 15%;
    animation-delay: 1s;
}

.floating-heart:nth-child(3) {
    bottom: 30%;
    left: 20%;
    animation-delay: 2s;
}

.floating-star:nth-child(4) {
    bottom: 20%;
    right: 10%;
    animation-delay: 3s;
}

/* 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;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideInDown 0.3s ease-out;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.success-icon {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 10px;
}

.modal-header h3 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-body {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
    line-height: 1.6;
}

.modal-footer {
    text-align: center;
}

.btn-close {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Location Banner Styles */
.location-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999; /* Giảm z-index để không che popup vị trí của trình duyệt */
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px;
    animation: slideInDown 0.3s ease-out;
}

.location-banner-content {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

.location-banner-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #856404;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.location-banner-close:hover {
    background: rgba(133, 100, 4, 0.1);
    transform: scale(1.1);
}

.location-banner-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    padding-right: 30px;
}

.location-banner-header i {
    color: #ff6b35;
    font-size: 18px;
}

.location-banner-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #856404;
}

.location-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.location-banner-btn {
    flex: 1;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
}

.location-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.location-banner-skip {
    background: transparent;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.location-banner-skip:hover {
    background: rgba(133, 100, 4, 0.1);
    border-color: #856404;
}

/* Mobile optimizations for location banner */
@media (max-width: 768px) {
    .location-banner {
        padding: 10px;
        /* Tối ưu cho mobile - banner nhỏ hơn để không che popup vị trí */
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .location-banner-content {
        padding: 15px;
        border-radius: 12px;
        /* Giảm kích thước banner trên mobile */
        max-width: 350px;
    }
    
    .location-banner-header {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .location-banner-text {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .location-banner-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .location-banner-btn,
    .location-banner-skip {
        width: 100%;
        padding: 12px 15px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .location-banner {
        padding: 8px;
    }
    
    .location-banner-content {
        padding: 12px;
    }
    
    .location-banner-header {
        font-size: 14px;
    }
    
    .location-banner-text {
        font-size: 12px;
    }
    
    .location-banner-close {
        top: 8px;
        right: 8px;
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .location-banner-btn,
    .location-banner-skip {
        min-height: 44px; /* iOS recommended touch target size */
    }
    
    .location-banner-close {
        min-width: 44px;
        min-height: 44px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .location-banner-content {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
    
    .location-banner-btn {
        background: #000;
        color: #fff;
        border: 2px solid #000;
    }
    
    .location-banner-skip {
        border: 2px solid #000;
        color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .location-banner {
        animation: none;
    }
    
    .location-banner-btn:hover,
    .location-banner-skip:hover,
    .location-banner-close:hover {
        transform: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .nav-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-tab {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .stats-widget {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
    }
}
