/* ASCII Tapper Level Editor Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #1a1a2e;
    color: #eee;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #4ade80;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.main-header {
    background-color: #16213e;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #0f3460;
}

.main-header h1 {
    font-size: 1.5rem;
    color: #4ade80;
}

.main-header h1 a {
    color: inherit;
}

.main-header h1 a:hover {
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: #aaa;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: #4ade80;
    text-decoration: none;
    border-bottom-color: #4ade80;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    color: #888;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.875rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.75rem;
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background-color: #4ade80;
    color: #1a1a2e;
}

.btn-primary:hover {
    background-color: #22c55e;
}

.btn-secondary {
    background-color: #374151;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-danger {
    background-color: #ef4444;
    color: #fff;
}

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

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #16213e;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid #0f3460;
}

.data-table th {
    background-color: #0f3460;
    font-weight: 600;
    color: #aaa;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background-color: #1e3a5f;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.actions-cell {
    white-space: nowrap;
}

.order-cell {
    width: 60px;
    color: #666;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-inactive {
    background-color: #374151;
    color: #9ca3af;
}

.status-testing {
    background-color: #854d0e;
    color: #fef08a;
}

.status-live {
    background-color: #166534;
    color: #86efac;
}

/* Type Badges */
.type-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.type-free {
    background-color: #1e40af;
    color: #93c5fd;
}

.type-paid {
    background-color: #7c2d12;
    color: #fed7aa;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.role-editor {
    background-color: #374151;
    color: #9ca3af;
}

.role-admin {
    background-color: #7c3aed;
    color: #ddd6fe;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #aaa;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background-color: #0f3460;
    border: 1px solid #1e3a5f;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9375rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4ade80;
}

.form-group input::placeholder {
    color: #666;
}

.form-group .help-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #666;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-section {
    background-color: #16213e;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.form-section h3 {
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    color: #fff;
    border-bottom: 1px solid #0f3460;
    padding-bottom: 0.75rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.inline-form {
    margin-bottom: 1rem;
}

.inline-form .form-row {
    margin-bottom: 1rem;
}

/* Cards */
.card {
    background-color: #16213e;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    color: #fff;
}

/* Messages */
.error-message {
    background-color: #7f1d1d;
    border: 1px solid #991b1b;
    color: #fecaca;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.success-message {
    background-color: #14532d;
    border: 1px solid #166534;
    color: #86efac;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background-color: #16213e;
    border-radius: 8px;
    color: #666;
}

/* Stats Summary */
.stats-summary {
    background-color: #16213e;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.stats-summary h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #aaa;
}

.stats-summary ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.stats-summary li {
    color: #888;
}

/* Level Status (on edit page) */
.level-status {
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    background-color: #16213e;
    padding: 2.5rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    color: #4ade80;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-container h2 {
    color: #888;
    text-align: center;
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 2rem;
}

.login-container .btn {
    width: 100%;
    padding: 0.875rem;
    margin-top: 0.5rem;
}

/* Vertolini ID Login */
.btn-vertolini {
    background-color: #4a90d9;
    color: white;
    text-align: center;
}

.btn-vertolini:hover {
    background-color: #3a7bc8;
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #0f3460;
}

.login-divider span {
    padding: 0 1rem;
    color: #666;
    font-size: 0.875rem;
}

/* Invite URL Box */
.invite-url-box {
    background-color: #0f3460;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.invite-url-box p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #aaa;
}

.invite-url-input {
    width: 100%;
    padding: 0.625rem;
    background-color: #1a1a2e;
    border: 1px solid #1e3a5f;
    border-radius: 4px;
    color: #4ade80;
    font-family: monospace;
    font-size: 0.875rem;
}

/* Invite Info */
.invite-info {
    text-align: center;
    color: #888;
    margin-bottom: 0.5rem;
}

.invite-info strong {
    color: #4ade80;
}

/* Code formatting */
code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    background-color: #0f3460;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.8125rem;
}

/* Text utilities */
.text-muted {
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        gap: 1rem;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-summary ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }
}
