/* Albanian Film Database - Stylesheet */

:root {
    --primary: #c41e3a;
    --primary-dark: #9a1830;
    --secondary: #1a1a2e;
    --accent: #e94560;
    --bg: #f5f5f5;
    --bg-dark: #0f0f23;
    --text: #333;
    --text-light: #666;
    --white: #fff;
    --border: #ddd;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
.header {
    background: var(--secondary);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.nav a:hover {
    opacity: 1;
}

.nav .admin-link {
    color: var(--accent);
}

/* Main */
.main {
    flex: 1;
    padding: 30px 0;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
    opacity: 0.9;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Page Title */
.page-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--secondary);
}

/* Film Grid */
.film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.film-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.film-card a {
    text-decoration: none;
    color: inherit;
}

.film-card .poster {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: var(--border);
}

.film-card .info {
    padding: 15px;
}

.film-card .title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--secondary);
}

.film-card .meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

.film-card .rating {
    margin-top: 10px;
    color: var(--warning);
}

/* Film Details */
.film-detail {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.film-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.film-header .poster {
    width: 100%;
    border-radius: var(--radius);
}

.film-header .title {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.film-header .title-en {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.film-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.film-meta span {
    background: var(--bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.film-synopsis {
    line-height: 1.8;
    margin-bottom: 30px;
}

.film-section {
    margin-bottom: 30px;
}

.film-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

/* Person/Company Cards */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.person-card {
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.person-card .photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    background: var(--border);
}

.person-card .name {
    font-weight: 600;
    margin-bottom: 5px;
}

.person-card .role {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Profile Page */
.profile-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.profile-header .photo {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--border);
}

.profile-header .name {
    font-size: 2rem;
    margin-bottom: 10px;
}

.profile-header .bio {
    color: var(--text-light);
    line-height: 1.8;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

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

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--secondary);
    color: var(--white);
    font-weight: 500;
}

.table tr:hover {
    background: var(--bg);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-draft {
    background: var(--warning);
    color: #000;
}

.badge-published {
    background: var(--success);
    color: var(--white);
}

.badge-pending {
    background: var(--warning);
    color: #000;
}

.badge-approved {
    background: var(--success);
    color: var(--white);
}

.badge-rejected {
    background: var(--danger);
    color: var(--white);
}

/* Voting */
.vote-form {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 30px;
}

.vote-category {
    margin-bottom: 15px;
}

.vote-category label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.star-rating {
    display: flex;
    gap: 5px;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 1.5rem;
    color: var(--border);
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--warning);
}

.star-rating {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* Ratings Display */
.ratings-display {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.rating-item {
    text-align: center;
}

.rating-item .label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.rating-item .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.rating-item .stars {
    color: var(--warning);
}

/* Filters */
.filters {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.filters form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters .form-group {
    margin-bottom: 0;
    min-width: 150px;
}

/* Search */
.search-box {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
}

.search-box input:focus {
    border-color: var(--primary);
    outline: none;
}

/* Dynamic Form Fields */
.dynamic-fields {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 15px;
}

.dynamic-field {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.dynamic-field input,
.dynamic-field select {
    flex: 1;
    min-width: 150px;
}

.btn-remove {
    background: var(--danger);
    color: var(--white);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

.btn-add {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: 10px;
}

/* Admin Panel */
.admin-nav {
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 10px 20px;
    background: var(--bg);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-card .label {
    color: var(--text-light);
    margin-top: 5px;
}

/* Awards */
.awards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.award-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg);
    border-radius: var(--radius);
}

.award-item .trophy {
    font-size: 1.5rem;
}

.award-item.won .trophy {
    color: gold;
}

/* Festivals List */
.festivals-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.festival-badge {
    background: var(--secondary);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.festival-badge.premiere {
    background: var(--primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border-radius: var(--radius);
    text-decoration: none;
    background: var(--white);
    color: var(--text);
    box-shadow: var(--shadow);
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
}

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

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.tabs a {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tabs a:hover,
.tabs a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .film-header {
        grid-template-columns: 1fr;
    }
    
    .film-header .poster {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
    }
    
    .filters form {
        flex-direction: column;
    }
    
    .filters .form-group {
        width: 100%;
    }
}

/* Autocomplete */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow);
}

.autocomplete-results .item {
    padding: 10px 15px;
    cursor: pointer;
}

.autocomplete-results .item:hover {
    background: var(--bg);
}

.autocomplete-results .item.create-new {
    color: var(--primary);
    font-weight: 500;
    border-top: 1px solid var(--border);
}

/* Frame image */
.film-frame {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 10px 0;
    margin-top: 10px;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown-content a {
    display: block;
    padding: 10px 20px;
    color: var(--text) !important;
    opacity: 1 !important;
}

.nav-dropdown-content a:hover {
    background: var(--bg);
    color: var(--primary) !important;
}

.btn-nav {
    background: var(--primary) !important;
    padding: 8px 15px;
    border-radius: var(--radius);
}

.btn-nav:hover {
    background: var(--primary-dark) !important;
}

/* Mobile Navigation */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 900px) {
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: var(--secondary);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 20px;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav a {
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-dropdown-content {
        position: static;
        display: none;
        background: rgba(0,0,0,0.2);
        box-shadow: none;
        margin-top: 0;
        padding-left: 20px;
    }
    
    .nav-dropdown.active .nav-dropdown-content {
        display: block;
    }
    
    .nav-dropdown-content a {
        color: var(--white) !important;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .header .container {
        position: relative;
    }
}

/* Additional Phase 2 Styles */
.filmography-section {
    margin-top: 30px;
}

.filmography-role {
    margin-bottom: 20px;
}

.filmography-role h4 {
    color: var(--primary);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border);
}

.filmography-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filmography-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 10px;
    background: var(--bg);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
}

.filmography-item:hover {
    background: var(--border);
}

.filmography-item .poster-thumb {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.filmography-item .title {
    font-weight: 600;
}

.filmography-item .year {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Contact Info Section */
.contact-info {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 20px;
}

.contact-info h4 {
    margin-bottom: 15px;
    color: var(--secondary);
}

.contact-info p {
    margin-bottom: 8px;
}

.contact-info a {
    color: var(--primary);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.social-links a:hover {
    transform: scale(1.1);
}
