* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0a0e17;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #1a1f2e, #2a1f3e);
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

header h1 {
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

header h1 i {
    color: #6c5ce7;
}

header p {
    color: #8892b0;
    margin-top: 5px;
    font-size: 14px;
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    height: calc(100vh - 180px);
    min-height: 500px;
}

/* Panels */
.panel {
    background: #141b2b;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.panel-header h2 {
    font-size: 16px;
    color: #ccd6f6;
    font-weight: 600;
}

.panel-actions {
    display: flex;
    gap: 8px;
}

/* Buttons */
.btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: #6c5ce7;
    color: white;
}

.btn-primary:hover {
    background: #7c6cf0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #1f2937;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #2d3748;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

/* Search */
.search-box {
    padding: 10px 20px;
    position: relative;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    background: #0d1422;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 13px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #6c5ce7;
}

.search-icon {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: #4a5568;
}

/* Games List */
.games-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px 10px 10px;
}

.games-list::-webkit-scrollbar {
    width: 6px;
}

.games-list::-webkit-scrollbar-track {
    background: transparent;
}

.games-list::-webkit-scrollbar-thumb {
    background: #2d3748;
    border-radius: 3px;
}

.game-item {
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.game-item:hover {
    background: #1f2937;
}

.game-item.active {
    background: #1f2937;
    border-color: #6c5ce7;
}

.game-item .game-name {
    font-weight: 500;
    color: #ccd6f6;
    font-size: 14px;
}

.game-item .game-id {
    color: #8892b0;
    font-size: 12px;
    font-family: monospace;
}

.game-item .game-meta {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
    color: #4a5568;
}

.game-item .game-meta span {
    background: #0d1422;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Cheats List */
.cheats-panel {
    flex: 1;
}

.cheats-toolbar {
    padding: 8px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cheats-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.cheats-list::-webkit-scrollbar {
    width: 6px;
}

.cheats-list::-webkit-scrollbar-track {
    background: transparent;
}

.cheats-list::-webkit-scrollbar-thumb {
    background: #2d3748;
    border-radius: 3px;
}

.cheat-item {
    padding: 12px 16px;
    margin-bottom: 6px;
    background: #0d1422;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.03);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.cheat-item:hover {
    background: #1a2236;
    border-color: rgba(108, 92, 231, 0.2);
}

.cheat-item.selected {
    border-color: #6c5ce7;
    background: #1a2236;
}

.cheat-item .cheat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cheat-item .cheat-name {
    font-weight: 500;
    color: #ccd6f6;
    font-size: 14px;
}

.cheat-item .cheat-status {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 12px;
}

.cheat-item .cheat-status.enabled {
    background: #1a3a2a;
    color: #48bb78;
}

.cheat-item .cheat-status.disabled {
    background: #3a1a1a;
    color: #fc8181;
}

.cheat-item .cheat-description {
    color: #8892b0;
    font-size: 13px;
    margin-top: 4px;
}

.cheat-item .cheat-code-preview {
    margin-top: 8px;
    font-family: monospace;
    font-size: 12px;
    color: #4a5568;
    background: #0a0e17;
    padding: 8px;
    border-radius: 4px;
    max-height: 60px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #4a5568;
    gap: 12px;
}

.empty-state i {
    color: #2d3748;
}

.empty-state p {
    font-size: 14px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s;
}

.modal-content {
    background: #141b2b;
    margin: 5% auto;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.05);
    animation: slideDown 0.3s;
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    color: #ccd6f6;
    font-size: 18px;
}

.close {
    color: #4a5568;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: #e0e0e0;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #8892b0;
    font-size: 13px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    background: #0d1422;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #6c5ce7;
}

textarea.form-control {
    font-family: monospace;
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #4a5568;
    font-size: 12px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #1f2937;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: #6c5ce7;
    transition: width 0.3s;
    width: 0%;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }
    
    .games-panel {
        max-height: 300px;
    }
    
    .cheats-panel {
        min-height: 400px;
    }
    
    .panel-actions {
        flex-wrap: wrap;
    }
    
    .btn {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

/* Scrollbar styling for all */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2d3748;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a5568;
}

/* Add to existing style.css */

.cheat-author {
    color: #6c5ce7;
    font-size: 12px;
    margin-top: 2px;
}

.import-success {
    background: #1a3a2a;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 3px solid #48bb78;
}

.import-success ul {
    margin-top: 8px;
    padding-left: 20px;
}

.import-success li {
    color: #a0aec0;
    margin-bottom: 4px;
}

.import-errors {
    background: #3a1a1a;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #fc8181;
}

.import-errors ul {
    margin-top: 8px;
    padding-left: 20px;
}

.import-errors li {
    color: #feb2b2;
    margin-bottom: 4px;
}.header-row{display:flex;align-items:center;justify-content:space-between;gap:20px}.header-row nav{display:flex;gap:8px;align-items:center}.inline-form{display:inline}.login-shell{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{width:min(420px,100%);background:#141b2b;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:28px;box-shadow:0 15px 40px rgba(0,0,0,.4)}.login-card h1{margin-bottom:8px}.login-card p{color:#8892b0;margin-bottom:22px}.login-card .btn{width:100%;justify-content:center;margin-top:8px}.flash{padding:10px 14px;border-radius:6px;margin:12px 0}.flash.error,.flash.warning{background:#4a1d24}.flash.success{background:#173d2a}.cbc-panel{margin-bottom:20px}.panel-body{padding:20px}.panel-body form{display:flex;gap:10px;align-items:center}.file-table{width:100%;border-collapse:collapse}.file-table th,.file-table td{padding:12px;border-bottom:1px solid rgba(255,255,255,.08);text-align:left}.file-table code{color:#ccd6f6}@media(max-width:700px){.header-row{align-items:flex-start;flex-direction:column}.panel-body form{align-items:stretch;flex-direction:column}.file-table{font-size:12px}}
