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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Background image is set dynamically from JavaScript */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* Fallback gradient if image not loaded */
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

header {
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.quote-card {
    background: rgba(255, 255, 255, 0.8); /* 80% opacity */
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quote-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

.quote-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.quote-text {
    font-size: 1.8rem;
    line-height: 1.6;
    color: #333;
    font-style: italic;
    margin-bottom: 30px;
    font-weight: 400;
}

.quote-author {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 600;
    font-style: normal;
    display: block;
    margin-top: auto;
}

.favorite-quote-btn {
    margin-top: 50px;
    align-self: center;
    width: auto;
    white-space: nowrap;
}

.date-weather-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px 20px;
    margin-bottom: 20px;
}

.date-info {
    color: white;
    font-size: 1rem;
    opacity: 0.9;
}

.weather-block {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 8px 12px;
    color: #f9fafb;
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weather-top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.weather-location {
    font-weight: 600;
}

.weather-summary {
    opacity: 0.9;
}

.weather-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.weather-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.weather-select {
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 4px 10px;
    border: none;
    outline: none;
    background: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
}

.actions {
    margin-bottom: 30px;
}

.btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

footer {
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Gallery */
.gallery-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    backdrop-filter: blur(6px);
}

.gallery-title {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.gallery-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.gallery-thumb-wrapper {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-thumb-wrapper::after {
    content: "View";
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 0;
}

.gallery-thumb-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.gallery-thumb {
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
}

/* Modal viewer */
.image-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.image-modal.hidden {
    display: none;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.image-modal-content {
    position: relative;
    background: #111827;
    padding: 20px 20px 16px;
    border-radius: 18px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    z-index: 1001;
}

.modal-image {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: #e5e7eb;
    cursor: pointer;
    line-height: 1;
}

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

.btn-secondary {
    background: #111827;
    color: #e5e7eb;
    border: 1px solid #374151;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #1f2937;
}

/* Loading animation */
.quote-text.loading {
    opacity: 0.5;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quote-card.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .quote-card {
        padding: 30px 25px;
        min-height: 250px;
    }
    
    .quote-text {
        font-size: 1.4rem;
    }
    
    .quote-author {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

