/* VHDL Exercises Platform - Minimal Dark Theme */

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

body {
    background: #000;
    color: #f8f9fa;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    color: #60a5fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    border-bottom: 1px solid #374151;
    padding: 1rem 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8f9fa;
}

.logo span {
    color: #b91c1c;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: #d1d5db;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: #b91c1c;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2rem;
    background: #111;
    border: 1px solid #374151;
    border-radius: 0.5rem;
}

.form-container h1 {
    margin-bottom: 1.5rem;
    font-size: 1.875rem;
    color: #f8f9fa;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    color: #f8f9fa;
    font-size: 0.875rem;
}

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

textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Courier New', monospace;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #b91c1c;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #991b1b;
}

.btn-secondary {
    background: #374151;
}

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

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Cards */
.card {
    background: #111;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #f8f9fa;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Exercise Page */
.exercise-header {
    margin-bottom: 2rem;
}

.exercise-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.exercise-description {
    color: #d1d5db;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.code-editor {
    width: 100%;
    min-height: 400px;
    padding: 1rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 0.375rem;
    color: #c9d1d9;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    tab-size: 4;
}

.output-box {
    margin-top: 2rem;
    padding: 1rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 0.375rem;
    overflow-x: auto;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #374151;
}

th {
    font-weight: 600;
    color: #f8f9fa;
    background: #1f2937;
}

td {
    color: #d1d5db;
}

tr:hover {
    background: #1f2937;
}

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

.status-accepted {
    background: #065f46;
    color: #d1fae5;
}

.status-pending {
    background: #78350f;
    color: #fef3c7;
}

.status-error {
    background: #7f1d1d;
    color: #fee2e2;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #065f46;
    color: #d1fae5;
    border: 1px solid #10b981;
}

.alert-error {
    background: #7f1d1d;
    color: #fee2e2;
    border: 1px solid #ef4444;
}

.alert-info {
    background: #1e3a8a;
    color: #dbeafe;
    border: 1px solid #3b82f6;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #374151;
    border-top-color: #b91c1c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
footer {
    border-top: 1px solid #374151;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
}

