/* Nova Codes Demos - Dark Theme Styles */

/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --bg-primary: #0f0f0f;
    --bg-card: #1a1a1a;
    --border-color: #333;
    --text-primary: #fff;
    --text-secondary: #aaa;
    --accent: #d274f7;
    --accent-hover: #b85de0;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Base Styles */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

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

/* Header */
.header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

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

.header__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header__logo-img {
    height: 32px;
    width: auto;
}

.header__logo-text {
    color: var(--text-secondary);
    font-weight: 400;
}

.header__logo span {
    color: var(--accent);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card__description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card__link {
    display: inline-block;
    color: var(--accent);
    font-weight: 500;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

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

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

.btn--secondary {
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn--secondary:hover {
    background-color: var(--accent);
    color: white;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

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

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23aaa' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.file-upload:hover {
    border-color: var(--accent);
    background-color: rgba(210, 116, 247, 0.05);
}

.file-upload.dragover {
    border-color: var(--accent);
    background-color: rgba(210, 116, 247, 0.1);
}

.file-upload__icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.file-upload__text {
    color: var(--text-secondary);
}

.file-upload input[type="file"] {
    display: none;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-card);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Demo Section */
.demo-section {
    padding: 2rem 0;
}

.demo-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.demo-section__actions {
    display: flex;
    gap: 0.75rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.toast--success {
    border-color: #22c55e;
}

.toast--error {
    border-color: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Nova Codes Watermark */
.watermark {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.5;
    z-index: 100;
}

.watermark a {
    color: var(--text-secondary);
}

.watermark a:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .hero {
        padding: 2.5rem 0;
    }

    .container {
        padding: 0 15px;
    }

    .demo-section__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .demo-section__actions {
        width: 100%;
    }

    .demo-section__actions .btn {
        flex: 1;
    }

    .watermark {
        bottom: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }

    .btn {
        padding: 0.625rem 1.25rem;
    }

    .card {
        padding: 1.25rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
