:root {
    --primary-color: #e50914;
    --primary-hover: #ff0f1f;
    --secondary-color: #141414;
    --background-color: #0f0f0f;
    --surface-color: #1a1a1a;
    --text-color: #ffffff;
    --text-secondary: #b3b3b3;
    --card-background: rgba(20, 20, 20, 0.7);
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Bebas Neue', sans-serif;
    transition: color var(--transition-speed);
}

.logo a:hover {
    color: var(--primary-hover);
}

.search-container {
    display: flex;
    gap: 0.5rem;
}

#search {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 300px;
    transition: background-color var(--transition-speed);
}

#search:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.5);
}

#search-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

#search-btn:hover {
    background: var(--primary-hover);
}

/* Navigation Styles */
.media-nav {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 0;
    margin-bottom: 2rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.media-nav .container {
    display: flex;
    gap: 2rem;
}

.media-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all var(--transition-speed);
    position: relative;
}

.media-nav a.active {
    background: var(--primary-color);
}

.media-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
}

.media-nav a:hover:not(.active) {
    background: rgba(229, 9, 20, 0.3);
}

/* Section Styles */
.section {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.movie-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-speed);
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.movie-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.movie-card:hover img {
    transform: scale(1.1);
}

.movie-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.movie-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    font-size: 0.85rem;
}

.rating {
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.year {
    color: var(--text-secondary);
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error and No Results Messages */
.error-message, .no-results {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 0, 0, 0.1);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.error-message h2, .no-results h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateX(150%);
    animation: slideIn 0.3s forwards;
    max-width: 300px;
}

@keyframes slideIn {
    to { transform: translateX(0); }
}

.toast.success {
    border-left: 4px solid #4caf50;
}

.toast.error {
    border-left: 4px solid #f44336;
}

.toast.info {
    border-left: 4px solid #2196f3;
}

/* Footer Styles */
.footer {
    background: linear-gradient(to right, #111111, #1f1f1f);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.dev-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-speed);
}

.dev-card:hover {
    transform: translateY(-5px);
}

.dev-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dev-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 1rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #e50914, #ff3b30);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dev-avatar span {
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

.dev-info h3 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.dev-info p {
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition-speed);
    font-size: 0.9rem;
}

.social-btn i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.social-btn.github {
    background: linear-gradient(45deg, #333, #555);
    color: white;
}

.social-btn.instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
}

.social-btn.telegram {
    background: linear-gradient(45deg, #0088cc, #00a2ff);
    color: white;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .search-container {
        width: 100%;
        max-width: 300px;
    }

    #search {
        width: 100%;
    }

    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .media-nav .container {
        justify-content: center;
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .movie-card img {
        height: 225px;
    }

    .movie-info h3 {
        font-size: 0.9rem;
    }

    .movie-meta {
        font-size: 0.8rem;
    }

    .dev-card {
        padding: 1.5rem;
    }
    
    .social-links {
        flex-direction: column;
    }
    
    .social-btn {
        width: 100%;
        justify-content: center;
    }
}
