:root {
    --bg-color: #0b0d12;
    --card-bg: rgba(18, 22, 29, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #FF003F; /* Rojo Fluorescente */
    --primary-hover: #e60039;
    --primary-glow: rgba(255, 0, 63, 0.5);
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --error: #f85149;
    --success: #1dd25e; /* Verde más brillante para contraste */
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at top right, rgba(255, 0, 63, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at bottom left, rgba(255, 0, 63, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px 0;
    overflow-x: hidden;
}

/* Glassmorphism */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.card {
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 480px;
    margin: 20px;
}

.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

.hidden {
    display: none !important;
}

/* Header y Logo */
.app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.brand-logo {
    max-height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 0, 63, 0.3));
}

.header-text h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.header-text p.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0px;
}

/* Typography & Headers */
h1, h2 {
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

p.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* Form Styles: Agrupación (Gestalt Proximity) */
.form-section {
    border: none;
    margin-bottom: 28px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.form-section legend {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

/* Form Styles */
.form-glass {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Dropdown */
.dropdown-container {
    position: relative;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #1c2128;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}
.dropdown-item:last-child {
    border-bottom: none;
}
.dropdown-item:hover {
    background: rgba(255,255,255,0.05);
}

/* File Upload Areas */
.photos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.upload-area {
    position: relative;
    height: 100px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.1);
    transition: all 0.2s;
    cursor: pointer;
    overflow: hidden;
}

.upload-area:hover, .upload-area.has-file {
    border-color: var(--primary);
    background: rgba(255, 0, 63, 0.05);
    box-shadow: inset 0 0 10px rgba(255, 0, 63, 0.1);
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    color: var(--text-muted);
}
.upload-placeholder .icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}
.filename {
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.btn.primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn.primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(255, 0, 63, 0.6);
    transform: translateY(-2px);
}

.btn.secondary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--text-main);
    margin-top: 16px;
}
.btn.secondary:hover {
    background: rgba(255, 0, 63, 0.1);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animated Success Checkmark (Peak-End Rule) */
.success-icon-container {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px auto;
}
.checkmark {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: block;
    stroke-width: 4;
    stroke: #fff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--success);
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 4;
    stroke-miterlimit: 10;
    stroke: var(--success);
    fill: none;
    animation: stroke .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}
@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 30px var(--success); }
}

.popup {
    text-align: center;
}

.status-msg {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--error);
}

@media (max-width: 400px) {
    .photos-grid {
        grid-template-columns: 1fr;
    }
}
