/*
 * ASCII Art Generator - Styles principaux
 * Thème cyberpunk/terminal
 */

/* Variables CSS */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #1a1e3f;
    --bg-tertiary: #252a4f;

    --text-primary: #00ff41;
    --text-secondary: #00d4ff;
    --text-accent: #ff00ff;
    --text-muted: #8b93c1;

    --border-color: #00ff4140;
    --border-active: #00ff41;

    --shadow-glow: 0 0 20px rgba(0, 255, 65, 0.3);
    --shadow-glow-strong: 0 0 30px rgba(0, 255, 65, 0.5);

    --font-mono: 'Courier New', 'Monaco', 'Consolas', monospace;
}

/* Reset et Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Animation de fond (effet Matrix) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(20px);
    }
}

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

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    text-shadow: var(--shadow-glow);
    margin-bottom: 10px;
    animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from {
        text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(0, 255, 65, 0.8), 0 0 30px rgba(0, 255, 65, 0.4);
    }
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Cartes/Panels */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Formulaires */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-active);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

/* Range Sliders */
.form-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
}

.slider-value {
    display: inline-block;
    min-width: 50px;
    text-align: center;
    color: var(--text-accent);
    font-weight: bold;
    margin-left: 10px;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Boutons */
.btn {
    padding: 12px 30px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #00ff41, #00d4ff);
    color: var(--bg-primary);
    border: none;
    font-weight: bold;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow-strong);
}

.btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--text-accent);
    color: var(--text-accent);
}

.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Zone de drop */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-tertiary);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--border-active);
    background: rgba(0, 255, 65, 0.05);
    box-shadow: var(--shadow-glow);
}

.drop-zone-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.drop-zone-text {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Preview */
.preview-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    font-size: 0.7rem;
    line-height: 1.2;
    overflow: auto;
    white-space: pre;
    font-family: var(--font-mono);
}

.preview-container::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.preview-container::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.preview-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

.preview-container::-webkit-scrollbar-thumb:hover {
    background: var(--border-active);
}

/* Loader */
.loader {
    display: none;
    text-align: center;
    padding: 20px;
}

.loader.active {
    display: block;
}

.spinner {
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--text-secondary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages d'erreur */
.error-message {
    background: rgba(255, 0, 100, 0.1);
    border: 1px solid #ff0064;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    color: #ff0064;
    display: none;
}

.error-message.show {
    display: block;
}

/* Messages de succès */
.success-message {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--text-primary);
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    display: none;
}

.success-message.show {
    display: block;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 2px solid var(--border-color);
    margin-top: 60px;
    color: var(--text-muted);
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

footer a:hover {
    text-shadow: var(--shadow-glow);
}

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

    .card {
        padding: 20px;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}