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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    color: #333;
    line-height: 1.6;
    overflow: hidden;
}

/* Main Content */
.main {
    background: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Controls */
.controls {
    padding: 15px 20px;
    background: rgba(26, 32, 44, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
    flex-shrink: 0;
}

.input-group {
    flex: 1;
    min-width: 250px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(74, 85, 104, 0.6);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(26, 32, 44, 0.7);
    backdrop-filter: blur(5px);
    color: #e2e8f0;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(45, 55, 72, 0.8);
}

.input-group input::placeholder {
    color: #a0aec0;
}

.fetch-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
}

.fetch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.fetch-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px 15px;
    color: #e2e8f0;
    background: rgba(26, 32, 44, 0.8);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error */
.error {
    text-align: center;
    padding: 30px 15px;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    margin: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error i {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}

/* Slideshow */
.slideshow {
    position: relative;
    flex: 1;
    background: rgba(26, 32, 44, 0.8);
    overflow: hidden;
    height: calc(100vh - 100px);
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #000;
    border-radius: 12px;
}

.slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.slide:hover .slide-info {
    transform: translateY(0);
}

.slide-info-line {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.slide-title-link {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0;
}

.slide-title-link:hover {
    color: #667eea;
    text-decoration: underline;
}

.slide-separator {
    color: #a0aec0;
    font-weight: 300;
    font-size: 1.2rem;
}

#slideAuthor {
    font-size: 1rem;
    opacity: 0.9;
    white-space: nowrap;
}

#slideSubreddit {
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Navigation Buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 10;
    opacity: 0.6;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 15px;
    color: #e2e8f0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(26, 32, 44, 0.8);
    backdrop-filter: blur(10px);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #4a5568;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #e2e8f0;
}

.empty-state p {
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .controls {
        flex-direction: row;
        align-items: end;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .input-group {
        min-width: 200px;
        flex: 1;
    }
    
    .fetch-btn {
        flex-shrink: 0;
    }
    
    .slideshow {
        height: calc(100vh - 120px);
    }
    
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .prev-btn {
        left: 15px;
    }
    
    .next-btn {
        right: 15px;
    }
    
    .slide-info {
        padding: 30px 20px 20px;
    }
    
    .slide-title-link {
        font-size: 1.2rem;
    }
    
    .slide-separator {
        font-size: 1rem;
    }
    
    #slideAuthor {
        font-size: 0.9rem;
    }
    
    #slideSubreddit {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    .slide-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .controls {
        padding: 10px 15px;
        gap: 10px;
    }
    
    .input-group {
        min-width: 150px;
    }
    
    .slideshow {
        height: calc(100vh - 110px);
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .slide-info {
        padding: 25px 15px 15px;
    }
    
    .slide-title-link {
        font-size: 1rem;
    }
    
    .slide-separator {
        font-size: 0.9rem;
    }
    
    #slideAuthor {
        font-size: 0.8rem;
    }
    
    #slideSubreddit {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
} 