/* Colores de Playnix KB */
:root {
    --bg-light: rgb(236, 228, 225);
    --bg-dark: rgb(21, 25, 33);
    --bg-white: rgb(243, 243, 243);
    --text-dark: rgb(25, 25, 25);
    --text-accent: rgb(226, 48, 3);
    --btn-primary: rgb(226, 48, 3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header */
header {
    background-color: #f3f3f3;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-bottom: 1px solid #e0e0e0;
}

.header-content {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: start;
    align-items: center;
}

.header-logo {
    height: 32px;
    width: auto;
}

.header-links a {
    color: var(--text-dark);
    text-decoration: none;
    margin-left: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.header-links a:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--btn-primary) 0%, #d43d00 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: inline-block;
    background-color: white;
    color: var(--btn-primary);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-box {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: var(--text-accent);
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-box h2 {
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

/* Search Box */
.search-box {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-box h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.search-container {
    position: relative;
}

.search-container input[type="text"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-container input[type="text"]:focus {
    outline: none;
    border-color: var(--btn-primary);
}

#autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#autocomplete-results .autocomplete-item {
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

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

#autocomplete-results .autocomplete-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 1rem;
    border-radius: 4px;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.game-card-content {
    padding: 1.5rem;
}

.game-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.game-card .specs {
    margin-bottom: 1rem;
}

.game-card .spec-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.game-card .spec-label {
    font-weight: bold;
    color: var(--text-dark);
}

.game-card .spec-value {
    color: var(--text-accent);
}

/* Game Detail */
.game-detail {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.game-detail-header {
    background: var(--bg-dark);
    color: white;
    padding: 2rem;
}

.game-detail-header h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0rem;
}

.game-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.game-detail-content {
    padding: 2rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.spec-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--btn-primary);
}

.spec-box h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.spec-box p {
    color: var(--text-accent);
    font-size: 1.25rem;
    font-weight: bold;
}

.description-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.description-box h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

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

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

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background-color: rgb(200, 40, 0);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(226, 48, 3, 0.3);
}

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

.btn-secondary:hover {
    background-color: rgb(35, 40, 50);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Messages */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #c3e6cb;
}

.info-message {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #bee5eb;
}

/* Admin Panel */
.admin-header {
    background: var(--bg-white);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav a {
    color: var(--text-dark);
    text-decoration: none;
    margin-right: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background-color: var(--bg-light);
    color: var(--text-accent);
}

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

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--bg-dark);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: bold;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

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

.admin-table img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: bold;
}

.badge-pending {
    background-color: #ffc107;
    color: #000;
}

.badge-approved {
    background-color: #28a745;
    color: white;
}

.badge-reports {
    background-color: #dc3545;
    color: white;
}

/* Verification badges for public view */
.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.verification-badge.verified {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.verification-badge.not-verified {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.verification-badge.reported {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.verification-icon {
    font-size: 1rem;
}

/* Badge container in cards */
.game-card-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Badge container in detail page */
.game-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Form Card */
.form-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-card h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* Back Link */
.back-link {
    margin-top: 1.5rem;
    text-align: center;
}

.back-link a {
    color: var(--text-accent);
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: 8px;
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.empty-state p {
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-links {
        margin-top: 1rem;
    }

    .header-links a {
        margin-left: 0;
        margin-right: 1rem;
    }

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

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-nav {
        margin-top: 1rem;
    }

    .admin-table {
        overflow-x: auto;
    }

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

    .action-buttons .btn {
        width: 100%;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--bg-light);
    border-top: 3px solid var(--btn-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

.hidden {
    display: none;
}
