:root {
    --primary-color: #1A535C;
    --secondary-color: #4ECDC4;
    --background-color: #F7FFF7;
    --accent-red: #FF6B6B;
    --accent-yellow: #FFE66D;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --shadow: 0 2px 10px rgba(26, 83, 92, 0.1);
    --border-radius: 12px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-color);
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234ECDC4' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: var(--text-dark);
    line-height: 1.6;
    padding-bottom: 80px;
    min-height: 100vh;
}

.app-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.app-header p {
    opacity: 0.9;
    font-size: 1rem;
}

.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-section {
    text-align: center;
    padding: 2rem 0;
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.hero-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.search-form, .add-route-form, .alert-settings {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.search-form h3, .add-route-form h3, .alert-settings h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.8rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    transform: scale(1.2);
}

.form-group label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 83, 92, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.stat-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.stat-card h4 {
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-card span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.search-results {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-top: 2rem;
}

.search-results h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.flight-result {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.flight-result:hover {
    box-shadow: var(--shadow);
    border-color: var(--secondary-color);
}

.flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.airline-name {
    font-weight: bold;
    color: var(--primary-color);
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-red);
}

.flight-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.tracked-routes {
    display: grid;
    gap: 1rem;
}

.route-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.route-card:hover {
    transform: translateY(-2px);
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.route-title {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.route-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.route-status.active {
    background: rgba(78, 205, 196, 0.2);
    color: var(--secondary-color);
}

.route-status.alert {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-red);
}

.route-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.route-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 100px;
}

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

.btn-danger {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #e74c3c;
}

.alert-history {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-top: 2rem;
}

.alert-item {
    border-left: 4px solid var(--secondary-color);
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(78, 205, 196, 0.05);
    border-radius: 0 8px 8px 0;
}

.alert-item.price-drop {
    border-left-color: var(--accent-red);
    background: rgba(255, 107, 107, 0.05);
}

.alert-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.alert-message {
    font-weight: 600;
    color: var(--text-dark);
}

.history-controls {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.price-chart-container {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    text-align: center;
}

.price-insights {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.insight-card {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.insight-card.positive {
    background: rgba(78, 205, 196, 0.1);
    border-left: 4px solid var(--secondary-color);
}

.insight-card.negative {
    background: rgba(255, 107, 107, 0.1);
    border-left: 4px solid var(--accent-red);
}

.insight-card.neutral {
    background: rgba(255, 230, 109, 0.1);
    border-left: 4px solid var(--accent-yellow);
}

.faq-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid #e0e6ed;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: rgba(78, 205, 196, 0.05);
}

.faq-question[aria-expanded="true"] {
    background: rgba(78, 205, 196, 0.1);
    color: var(--primary-color);
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer:not([hidden]) {
    padding: 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.6;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.7rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.nav-item.active {
    color: var(--primary-color);
    background: rgba(78, 205, 196, 0.1);
}

.nav-item:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
    background: rgba(26, 83, 92, 0.05);
    margin-top: 3rem;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    max-width: 300px;
    z-index: 2000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid var(--secondary-color);
}

.notification.error {
    border-left: 4px solid var(--accent-red);
}

.notification.warning {
    border-left: 4px solid var(--accent-yellow);
}

@media (max-width: 768px) {
    .app-header h1 {
        font-size: 1.5rem;
    }
    
    .hero-section h2 {
        font-size: 1.3rem;
    }
    
    .search-form, .add-route-form, .alert-settings {
        padding: 1.5rem;
    }
    
    .route-actions {
        flex-direction: column;
    }
    
    .btn-secondary {
        min-width: auto;
    }
    
    .history-controls {
        grid-template-columns: 1fr;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .app-main {
        padding: 0.5rem;
    }
    
    .search-form, .add-route-form, .alert-settings {
        padding: 1rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .nav-item {
        font-size: 0.6rem;
        min-width: 50px;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
}
