body {
    margin: 0;
    background-color: #191919;
    color: #e2e8f0;
    font-family: Arial, sans-serif;
}

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

.header {
    background: #131313;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #16d7f9;
}

.nav a {
    margin-left: 15px;
    color: #60a5fa;
    text-decoration: none;
}

.nav a:hover {
    text-decoration: underline;
}

.card {
    background: #131313;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
}

.title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.table th,
.table td {
    border: 1px solid #1e293b;
    padding: 8px 10px;
}

.table th {
    background-color: #111827;
}

.field {
    margin-bottom: 15px;
}

.field label {
    display: block;
    margin-bottom: 5px;
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #1e293b;
    background-color: #1e293b;
    color: #e2e8f0;
    box-sizing: border-box;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: 1px solid #2563eb;
}

.button {
    background-color: #2563eb;
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    width: 200px;
    text-align: center;
    display: inline-block;
}

.button:hover {
    background-color: #1d4ed8;
}

.status {
    color: #22c55e;
    margin-bottom: 10px;
}

.error {
    color: #f87171;
    font-size: 13px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.game-card {
    background-color: #0c121f;
    border: 1px solid #0c0c18;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.game-cover {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 6px;
}

.game-cover.placeholder {
    background-color: #1e293b;
    width: 100%;
    height: 240px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
}

.game-info {
    margin-top: 8px;
}

.game-title {
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 5px;
}

.game-meta {
    font-size: 14px;
    color: #94a3b8;
}

.library-list {
    margin-top: 10px;
}

.library-header,
.library-row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) 80px 80px 140px 140px;
    align-items: center;
    padding: 8px 10px;
}

.library-header {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    border-bottom: 1px solid #1e293b;
}

.library-row {
    border-bottom: 1px solid #1e293b;
    font-size: 14px;
}

.library-row:hover {
    background-color: #111827;
}

.library-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-col {
    gap: 10px;
}

.small-col {
    justify-content: center;
}

.medium-col {
    justify-content: center;
}

.title-cell {
    display: flex;
    align-items: center;
}

.cover-wrapper {
    flex-shrink: 0;
    cursor: pointer;
}

.library-cover {
    width: 45px;
    height: 65px;
    border-radius: 4px;
    object-fit: cover;
}

.library-cover.placeholder {
    background-color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 11px;
}

.title-text {
    display: flex;
    flex-direction: column;
}

.title-link {
    color: #e2e8f0;
    text-decoration: none;
}

.title-link:hover {
    text-decoration: underline;
}

.subtitle {
    font-size: 12px;
    color: #9ca3af;
}

.modal.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.8);
}

.modal-content {
    position: relative;
    max-width: 420px;
    margin: 10% auto 0 auto;
    background-color: #020617;
    border-radius: 15px;
    padding: 20px 22px;
    border: 1px solid #1e293b;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.search-input {
    max-width: 280px;
}

.search-select {
    max-width: 200px;
}

.clear-link {
    color: #60a5fa;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.home-hero {
    text-align: center;
    padding: 40px 30px;
}

.home-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.home-subtitle {
    font-size: 18px;
    color: #94a3b8;
    max-width: 700px;
    margin: 0 auto 25px auto;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
}

.home-button-secondary {
    background-color: #334155;
}

.home-button-secondary:hover {
    background-color: #1f2937;
}
