@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #000000;
    --bg-elevated: #0a0a0a;
    --bg-card: #0f0f0f;
    --border: #222222;
    --border-hover: #444444;
    --text: #ededed;
    --text-muted: #888888;
    --text-soft: #a1a1a1;
    --accent: #ffffff;
    --accent-hover: #e5e5e5;
    --success: #2ed573;
    --error: #ff5555;
    --radius: 10px;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

@media (min-width: 900px) {
    .split-layout {
        grid-template-columns: 440px 1fr;
    }
}

.brand-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
}

.brand-logo {
    max-height: 48px;
    width: auto;
    margin-bottom: 4px;
}

.brand-studio {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.login-section {
    background: linear-gradient(180deg, #000 0%, #080808 100%);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 900px) {
    .login-section {
        border-right: 1px solid var(--border);
        padding: 48px 40px;
    }
}

.login-box {
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
}

.login-box h2, .form-card h2, .plans-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: -0.03em;
}

@media (min-width: 600px) {
    .login-box h2, .form-card h2, .plans-header h2 { font-size: 28px; }
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-soft);
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--bg-elevated);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
    background-color: #0d0d0d;
}

.input-error {
    border-color: var(--error) !important;
}

.input-key-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.input-key {
    display: block;
    width: 100% !important;
    padding: 13px 16px !important; 
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--bg-elevated);
    color: #fff;
    font-size: 14px;
    font-family: monospace;
    letter-spacing: 0.06em;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box !important;
}

.input-key:focus {
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
    background-color: #0d0d0d;
}

button {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

button:active:not(:disabled) {
    transform: scale(0.97);
}

.btn-primary {
    background-color: var(--accent);
    color: #000;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background-color: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #151515;
    border-color: var(--border-hover);
}

/* === BOTONES EXTRAS (DPI Y BOTON+) === */
.action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.btn-extra {
    flex: 0 0 auto;
    width: auto;
    padding: 14px 16px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-extra.active {
    background-color: rgba(46, 213, 115, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.action-row .btn-primary {
    flex: 1; /* El botón generar toma el espacio restante */
}
/* ===================================== */


.is-loading { opacity: 0.7; pointer-events: none; }

.plans-section {
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 30%), #050505;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 900px) {
    .plans-section { padding: 48px 40px; }
}

.plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .plans-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
    .plans-grid { grid-template-columns: repeat(4, 1fr); }
}

.plan-card {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
    transform: translateY(-4px);
    border-color: #444;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.plan-card.highlighted {
    border-color: #555;
    background: linear-gradient(180deg, #121212 0%, #0a0a0a 100%);
}

.plan-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #000;
    background: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.plan-features {
    list-style: none;
    margin-bottom: 20px;
    flex-grow: 1;
}

.plan-features li {
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
}

.error-text {
    color: var(--error);
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
}

.hidden { display: none !important; }

.support-info {
    margin-top: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

@media (min-width: 900px) {
    .support-info {
        margin-top: auto;
        padding-top: 40px;
        justify-content: flex-start;
    }
}

.support-info a {
    color: var(--text-soft);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.support-info a:hover {
    color: #fff;
    text-decoration: underline;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 90%;
    max-width: 420px;
    padding: 24px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-size: 20px;
    color: #fff;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: auto;
    line-height: 1;
}

.btn-close:hover {
    color: #fff;
}

.modal-body {
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 24px;
}

.modal-price {
    font-size: 16px;
    color: #fff;
    margin-top: 16px;
    border-top: 1px dashed var(--border);
    padding-top: 16px;
}

.top-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

@media (min-width: 600px) {
    .top-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 16px 32px;
    }
}

.nav-brand {
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-logo { height: 24px; width: auto; }

.nav-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

@media (min-width: 600px) {
    .nav-user { flex-direction: row; gap: 16px; }
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 16px;
    font-size: 12px;
    width: auto;
}

.dashboard-container {
    max-width: 540px;
    margin: 24px auto;
    padding: 0 16px;
    width: 100%;
}

.form-card, .result-card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 20px;
    margin-bottom: 20px;
}

@media (min-width: 600px) {
    .form-card, .result-card { padding: 36px; }
}

.result-title {
    margin-bottom: 8px;
    color: #fff;
    font-size: 18px;
}

.result-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 18px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.result-item:last-child { border-bottom: none; }
.result-item span { color: var(--text-soft); font-size: 14px; }
.result-item strong { color: var(--success); font-size: 18px; font-weight: 700; }
.result-item.highlight strong { color: #fff; background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 6px;}