/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../wallpaper.jpg') center center no-repeat fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
header {
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 20px;
}

.stats-bar {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-link {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 5px;
    transition: background 0.3s;
}

.stats-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
main {
    padding: 40px;
    background: transparent;
}

/* Video Container */
.video-container {
    margin-bottom: 30px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#clip-video {
    width: 100%;
    display: block;
    max-height: 500px;
}

.video-info {
    background: #222;
    color: white;
    padding: 15px;
    font-size: 0.9em;
}

/* Identification Form */
.identification-form {
    background: transparent;
    padding: 30px;
    border-radius: 10px;
}

.identification-form h2 {
    color: white;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.identification-form h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2em;
}

/* Multiple characters checkbox */
.multiple-mode {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.multiple-mode label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1em;
    color: white;
    font-weight: 500;
}

.multiple-mode input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

/* Main Characters Grid */
.main-characters {
    margin-bottom: 30px;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.character-btn {
    background: white;
    border: 2px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s;
    color: #333;
}

.character-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.character-btn.selected {
    background: #4a5f8c;
    color: #e8edf7;
    border-color: #36486b;
}

/* Custom Input */
.custom-input {
    margin-bottom: 30px;
}

.autocomplete-container {
    position: relative;
}

#custom-character {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

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

/* Autocomplete dropdown */
.autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.autocomplete-items:empty {
    display: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.action-buttons button {
    flex: 1;
    padding: 15px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.submit-btn {
    background: #2d6a4f;
    color: #e8f5e9;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 106, 79, 0.4);
    background: #1f4d37;
}

.not-sure-btn {
    background: #8b5a3c;
    color: #f5e8dc;
}

.not-sure-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 90, 60, 0.4);
    background: #6d4630;
}

.skip-btn {
    background: #3a5a8c;
    color: #e8f0f7;
}

.skip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(58, 90, 140, 0.4);
    background: #2d4670;
}

/* Message */
.message {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s;
}

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

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

/* Footer */
footer {
    padding: 20px;
    text-align: center;
    color: white;
    font-size: 0.9em;
}

footer a {
    color: #2a5298;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Stats Page */
.stats-page {
    padding: 30px;
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
}

.stats-section {
    margin-bottom: 40px;
}

.stats-section h2 {
    color: #2a5298;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.stats-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stats-table thead {
    background: #2a5298;
    color: white;
}

.stats-table th,
.stats-table td {
    padding: 15px;
    text-align: left;
}

.stats-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.stats-table tbody tr:hover {
    background: #e9ecef;
}

.no-data {
    text-align: center !important;
    color: #999;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .character-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    main {
        padding: 20px;
    }
}
