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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header */
header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

/* Main content */
main {
    padding: 2rem 0;
}

section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

section h2 {
    color: #4a5568;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* Stats section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.stat-card.positive {
    border-color: #48bb78;
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
}

.stat-card.negative {
    border-color: #f56565;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

.stat-card.neutral {
    border-color: #ed8936;
    background: linear-gradient(135deg, #fffaf0 0%, #feebc8 100%);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #4a5568;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Chart */
.chart-container {
    max-width: 400px;
    margin: 0 auto;
}

/* Search section */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

#searchInput {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    min-width: 300px;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

#loadRandomBtn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

#loadRandomBtn:hover {
    box-shadow: 0 10px 25px rgba(72, 187, 120, 0.4);
}

/* Results section */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.movie-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid;
    transition: all 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.movie-card.positive {
    border-left-color: #48bb78;
    background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
}

.movie-card.negative {
    border-left-color: #f56565;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.movie-card.neutral {
    border-left-color: #ed8936;
    background: linear-gradient(135deg, #ffffff 0%, #fffaf0 100%);
}

.movie-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.movie-year {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.movie-plot {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.sentiment-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.sentiment-badge.positive {
    background: #48bb78;
    color: white;
}

.sentiment-badge.negative {
    background: #f56565;
    color: white;
}

.sentiment-badge.neutral {
    background: #ed8936;
    color: white;
}

.sentiment-score {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 3rem;
}

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

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

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    color: white;
    margin-top: 2rem;
}

.tech-stack {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
    }
    
    #searchInput {
        min-width: auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .movies-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
}