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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0f2027 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
    transition: all 0.3s ease;
}

body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333333;
}

body.light-theme .container section {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333333;
}

body.light-theme h2, body.light-theme h3 {
    color: #2c5282;
}

body.light-theme .percentage {
    background: linear-gradient(45deg, #2c5282, #3182ce);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.header-controls {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-icon, .btn-toggle, .btn-tertiary {
    padding: 8px 12px;
    border: 2px solid rgba(100, 255, 218, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #64ffda;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-icon:hover, .btn-toggle:hover, .btn-tertiary:hover {
    background: rgba(100, 255, 218, 0.2);
    border-color: #64ffda;
}

.btn-tertiary {
    background: transparent;
    border: 1px solid #64ffda;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #64ffda, #00e676, #69f0ae);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.2rem;
    color: #b3b3b3;
}

section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h2, h3 {
    margin-bottom: 20px;
    color: #64ffda;
}

.location-inputs {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.manual-location {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.or-divider {
    color: #b3b3b3;
    font-style: italic;
}

input {
    padding: 12px 16px;
    border: 2px solid rgba(100, 255, 218, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    flex: 1;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #64ffda;
    background: rgba(255, 255, 255, 0.15);
}

input::placeholder {
    color: #b3b3b3;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(45deg, #64ffda, #00e676);
    color: #0f0f23;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 255, 218, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #64ffda;
    border: 2px solid #64ffda;
}

.btn-secondary:hover {
    background: #64ffda;
    color: #0f0f23;
}

.current-location {
    color: #b3b3b3;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(100, 255, 218, 0.3);
    border-left: 4px solid #64ffda;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.visibility-meter {
    text-align: center;
    margin-bottom: 30px;
}

.percentage {
    font-size: 4rem;
    font-weight: bold;
    background: linear-gradient(45deg, #64ffda, #00e676);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.meter-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff5722, #ff9800, #ffc107, #8bc34a, #4caf50);
    border-radius: 10px;
    transition: width 1s ease;
    width: 0%;
}

.current-conditions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.condition-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #64ffda;
}

.label {
    color: #b3b3b3;
    font-weight: 600;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.forecast-item:hover {
    transform: translateY(-5px);
}

.forecast-date {
    font-weight: bold;
    color: #64ffda;
    margin-bottom: 5px;
}

.forecast-percentage {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
}

.forecast-kp {
    color: #b3b3b3;
    font-size: 0.9rem;
}

#historyChart {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #64ffda;
}

.info-item h4 {
    color: #64ffda;
    margin-bottom: 10px;
}

.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ffcdd2;
    text-align: center;
    padding: 30px;
    border-radius: 10px;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    color: #b3b3b3;
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Copyright Section */
.copyright-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    text-align: center;
    color: #b3b3b3;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.copyright a {
    color: #64ffda;
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: #00e676;
}

.footer-links {
    text-align: center;
    color: #b3b3b3;
    font-size: 0.9rem;
}

.footer-links a {
    color: #64ffda;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00e676;
}

/* Cookie Consent Popup */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(100, 255, 218, 0.3);
    z-index: 1000;
    animation: slideUp 0.5s ease;
}

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

.cookie-content h3 {
    color: #64ffda;
    margin-bottom: 15px;
}

.cookie-content p {
    color: #b3b3b3;
    margin-bottom: 20px;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a3e, #0f2027);
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #64ffda;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #64ffda;
}

.modal-body {
    padding: 30px;
    color: #ffffff;
}

.modal-body h4 {
    color: #64ffda;
    margin: 20px 0 10px 0;
}

.modal-body ul {
    margin: 10px 0 10px 20px;
}

.modal-body li {
    margin-bottom: 5px;
}

.preference-item {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #64ffda;
}

.preference-item label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.preference-title {
    font-weight: bold;
    color: #64ffda;
    margin-bottom: 5px;
}

.preference-desc {
    color: #b3b3b3;
    font-size: 0.9rem;
    margin: 5px 0 0 0;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: right;
}

.privacy-updated {
    margin-top: 20px;
    color: #b3b3b3;
    font-size: 0.9rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .header-controls {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
    }
    
    .location-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .manual-location {
        min-width: auto;
    }
    
    .percentage {
        font-size: 3rem;
    }
    
    .current-conditions {
        grid-template-columns: 1fr;
    }
    
    .forecast-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .cookie-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-buttons button {
        width: 100%;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 15px 20px;
    }
    
    .footer-links {
        font-size: 0.8rem;
    }
    
    .footer-links a {
        display: inline-block;
        margin: 2px 3px;
    }
}