/* RESET & BASE */
:root {
    --bg-color: #050505;
    --panel-bg: #0a0a0a;
    --text-primary: #e0e0e0;
    --text-dim: #888;
    --accent-cyan: #00f3ff;
    --accent-magenta: #ff0099;
    --accent-yellow: #f2ff00;
    --border-color: #333;
    --font-heading: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-heading);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* UTILIDADES */
.hidden { display: none !important; }

/* CONTAINER PRINCIPAL */
.cyber-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* HEADER STYLE */
.cyber-header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 2px solid var(--accent-cyan);
    margin-bottom: 40px;
    position: relative;
}

.glitch-wrapper {
    display: inline-block;
}

.glitch {
    font-family: var(--font-mono);
    font-size: 3rem;
    color: var(--text-primary);
    text-transform: uppercase;
    position: relative;
    text-shadow: 2px 2px var(--accent-magenta), -2px -2px var(--accent-cyan);
}

.subtitle {
    color: var(--accent-cyan);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-top: 10px;
}

.description {
    color: var(--text-dim);
    margin-top: 10px;
    font-family: var(--font-mono);
}

/* SECCIONES ESTILO TARJETA */
.cyber-section {
    background: rgba(16, 16, 16, 0.8);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.05);
}

.cyber-section::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 20px; height: 20px;
    border-top: 2px solid var(--accent-cyan);
    border-left: 2px solid var(--accent-cyan);
}
.cyber-section::after {
    content: '';
    position: absolute;
    bottom: -1px; right: -1px;
    width: 20px; height: 20px;
    border-bottom: 2px solid var(--accent-magenta);
    border-right: 2px solid var(--accent-magenta);
}

.section-title {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.section-header-row .section-title { border: none; margin: 0; padding: 0; }

/* UPLOAD BOX */
.upload-box {
    border: 2px dashed var(--accent-magenta);
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 0, 153, 0.05);
}
.upload-box:hover {
    background: rgba(255, 0, 153, 0.1);
    box-shadow: 0 0 20px rgba(255, 0, 153, 0.2);
}

input[type="file"] { display: none; }

.upload-btn {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 15px 30px;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    font-weight: bold;
}
.upload-btn:hover {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 15px var(--accent-cyan);
}

.upload-note {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* DATA SUMMARY */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: #111;
    border-left: 3px solid var(--accent-yellow);
    padding: 15px;
}
.stat-label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; }
.stat-value { font-size: 1.5rem; color: var(--text-primary); font-family: var(--font-mono); }

.column-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.col-badge {
    background: #000;
    border: 1px solid var(--border-color);
    color: var(--accent-cyan);
    padding: 5px 10px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}
.col-badge .type { color: var(--accent-magenta); margin-left: 5px; font-size: 0.7rem; }

/* TABLE */
.table-responsive {
    overflow-x: auto;
}
.cyber-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    min-width: 800px;
}
.cyber-table th {
    text-align: left;
    padding: 12px;
    background: rgba(0, 243, 255, 0.1);
    color: var(--accent-cyan);
    border-bottom: 2px solid var(--accent-cyan);
}
.cyber-table td {
    padding: 10px;
    border-bottom: 1px solid #222;
    color: #ccc;
}
.cyber-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* CODE AREAS */
.code-wrapper { position: relative; }
textarea {
    width: 100%;
    background: #080808;
    color: #00ff00; /* Terminal Green */
    border: 1px solid #333;
    padding: 15px;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    min-height: 250px;
    resize: vertical;
}
textarea:focus { outline: 1px solid var(--accent-cyan); }

.cyber-btn {
    background: transparent;
    border: 1px solid var(--accent-magenta);
    color: var(--accent-magenta);
    padding: 10px 20px;
    font-family: var(--font-mono);
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.2s;
}
.cyber-btn:hover {
    background: var(--accent-magenta);
    color: #000;
    box-shadow: 0 0 10px var(--accent-magenta);
}
.cyber-btn.sm {
    padding: 5px 15px;
    font-size: 0.8rem;
}

/* DAX SECTION */
.dax-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .dax-grid { grid-template-columns: 1fr; }
}

.tech-list {
    list-style: none;
    padding: 0;
}
.tech-list li {
    padding: 10px;
    border-bottom: 1px solid #222;
    font-family: var(--font-mono);
    color: #bbb;
    position: relative;
    padding-left: 20px;
}
.tech-list li::before {
    content: '>';
    color: var(--accent-cyan);
    position: absolute;
    left: 0;
}

/* FOOTER */
.cyber-footer {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 50px;
    font-family: var(--font-mono);
}
.footer-title { color: var(--accent-yellow); margin-bottom: 15px; }
.steps-list { margin-left: 20px; color: #aaa; margin-bottom: 20px; }
.steps-list li { margin-bottom: 5px; }
.credits { text-align: center; color: #444; font-size: 0.8rem; margin-top: 30px; }

/* TOAST */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}
.toast {
    background: #111;
    border-left: 4px solid var(--accent-cyan);
    color: #fff;
    padding: 15px 25px;
    margin-top: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    font-family: var(--font-mono);
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* WIZARD STYLES */
.wizard-intro {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.wizard-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wizard-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cyber-select {
    background: #080808;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cyber-select:hover {
    border-color: var(--accent-cyan);
}

.cyber-select:focus {
    outline: none;
    border-color: var(--accent-magenta);
    box-shadow: 0 0 8px rgba(255, 0, 153, 0.3);
}

.cyber-select option {
    background: #080808;
    color: var(--text-primary);
}

.wizard-controls .cyber-btn {
    grid-column: 1 / -1;
    justify-self: center;
    padding: 12px 40px;
    margin-top: 10px;
}

.wizard-output {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.output-section {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    padding: 20px;
}

.output-title {
    font-family: var(--font-mono);
    color: var(--accent-yellow);
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.generated-code {
    background: #000;
    color: #00ff00;
    padding: 15px;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid #222;
    margin-bottom: 10px;
    min-height: 100px;
}

.instructions-box {
    background: rgba(0, 243, 255, 0.03);
    border-left: 3px solid var(--accent-cyan);
    padding: 15px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #ccc;
}

.instruction-list {
    margin-left: 20px;
    color: #bbb;
}

.instruction-list li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.instruction-list strong {
    color: var(--accent-cyan);
}

.instruction-list code {
    background: rgba(0, 0, 0, 0.5);
    color: var(--accent-magenta);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', monospace;
}

@media (max-width: 768px) {
    .wizard-controls {
        grid-template-columns: 1fr;
    }
}
