/* Global Styles */
:root {
    --primary-color: #4a86e8;
    --secondary-color: #6aa84f;
    --accent-color: #f6b26b;
    --dark-color: #333333;
    --light-color: #f9f9f9;
    --text-color: #333333;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: #2a66c8;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
    font-size: 1rem;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: #2a66c8;
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn.secondary:hover {
    background-color: #4a8a2f;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

/* Main Content Styles */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5%;
}

section {
    margin-bottom: 4rem;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

section p {
    color: #666;
    max-width: 800px;
    margin-bottom: 2rem;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 4rem;
    min-height: 500px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.hero-content .stats {
    font-weight: bold;
    color: var(--primary-color);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-image {
    height: 400px;
    border-radius: var(--border-radius);
    background-size: cover;
    background-position: center;
    position: relative;
    box-shadow: var(--box-shadow);
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* Random Section */
.random-section {
    text-align: center;
}

.random-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.image-display {
    width: 100%;
    max-width: 600px;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--box-shadow);
}

.image-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

/* Search Section */
.search-section {
    text-align: center;
}

.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.search-form {
    display: flex;
    width: 100%;
    max-width: 600px;
    gap: 1rem;
}

.search-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

/* Films Section */
.films-section {
    text-align: center;
}

.film-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.film-selector select {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    min-width: 200px;
}

/* Gallery */
.gallery {
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    height: 250px;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--box-shadow);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 5% 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-info h3,
.footer-links h3,
.footer-api h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-links ul,
.footer-api ul {
    list-style: none;
}

.footer-links ul li,
.footer-api ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a,
.footer-api ul li a {
    color: #ddd;
}

.footer-links ul li a:hover,
.footer-api ul li a:hover {
    color: white;
}

.copyright {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #555;
    font-size: 0.9rem;
    color: #aaa;
}

/* API Documentation Styles */
.api-docs main {
    max-width: 1000px;
}

.api-header {
    text-align: center;
    margin-bottom: 3rem;
}

.api-header h1 {
    font-size: 2.5rem;
}

.api-header .stats {
    font-weight: bold;
    color: var(--primary-color);
}

.api-overview ul {
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.endpoint {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.endpoint h3 {
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.endpoint-details {
    margin-bottom: 1.5rem;
}

.endpoint-details code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

.endpoint-details ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.api-response pre {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-family: monospace;
    margin-bottom: 2rem;
}

.code-example {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.code-example h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.code-example pre {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-family: monospace;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }
    
    nav ul {
        margin-top: 1rem;
    }
    
    nav ul li {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .film-selector {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}
