body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    background: url('../../Hamburguesa/board.png') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    margin: 0;
    padding: 20px;
    color-scheme: light;
}

h1 {
    font-size: 2.5em;
    color: #ff6600;
}

.container {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

/* --- LOGO TABS & GRID --- */
.logo-tabs {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    text-align: left;
}

.tabs-header {
    display: flex;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: bold;
    color: #888;
    transition: all 0.2s;
    font-size: 0.9em;
}

.tab-btn.active {
    background: #fff;
    color: #ff6600;
    border-bottom: 2px solid #ff6600;
}

.tab-content, .prod-tab-content {
    display: none;
    padding: 15px;
}

.tab-content.active, .prod-tab-content.active {
    display: block;
}

.upload-container {
    text-align: center;
    padding: 10px 0;
}

.file-hint {
    margin: 8px 0 0;
    font-size: 0.78em;
    color: #888;
    background: #f9f4ef;
    border-radius: 5px;
    padding: 6px 10px;
    border: 1px solid #f0dcc8;
    text-align: left;
    line-height: 1.4;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.logo-item {
    aspect-ratio: 1 / 1;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #f0f0f0;
    background-image: 
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0), 
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: 48px;
    height: 48px;
}

.logo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #ff6600;
}

.logo-item.selected {
    border-color: #ff6600;
    background: #fff5ed;
    box-shadow: inset 0 0 0 1px #ff6600;
}

.divider::before, .divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #ddd;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

#logoThumbnail {
    display: none; 
    max-width: 120px;
    max-height: 120px;
    margin: 15px auto 0;
    border: 2px dashed #aaa;
    border-radius: 8px;
    object-fit: contain;
    padding: 5px;
    background-color: #f0f0f0;
    background-image: 
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0), 
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
}

button {
    background-color: #ff6600;
    color: white;
    border: none;
    padding: 9px 18px;
    font-size: 1em;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

button:hover {
    background-color: #e65c00;
}

#btnProceedToTech:disabled {
    background-color: #cccccc !important;
    color: #888888 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.8;
}

.secondary-btn {
    background-color: #444;
    color: white;
    font-size: 0.85em;
    padding: 8px 15px;
    margin-top: 10px;
}

.secondary-btn:hover {
    background-color: #222;
}

.secondary-btn i {
    margin-right: 5px;
}

.ctrl-btn {
    width: 40px;
    height: 32px;
    font-size: 1rem;
    cursor: pointer;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn:hover {
    background-color: #555;
    transform: scale(1.05);
}

#previewArea {
    position: relative;
    width: 100%;
    max-width: 380px; 
    height: 380px; 
    background-color: transparent; 
    margin: 20px auto 10px;
    display: flex; 
    justify-content: center;
    align-items: center;
    overflow: visible; 
    border-radius: 12px; 
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}

#logoPlaceholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    font-weight: 900;
    color: rgba(90, 45, 15, 0.25);
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 5;
    pointer-events: none;
    user-select: none;
    text-align: center;
    width: 90%;
    line-height: 1.2;
}

#breadImg {
    width: 100%;
    height: auto; 
    display: block;
    border-radius: 12px;
    transition: transform 0.2s ease;
    mix-blend-mode: multiply;
    filter: contrast(1.1) brightness(1.05); /* Mejorar integración con la madera */
}

#logoImg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    height: auto; 
    transition: width 0.2s ease, transform 0.3s ease;
    display: none; 
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    
    /* EFECTO SELLO/TOSTADO */
    mix-blend-mode: multiply;
    opacity: 0.90; 
    filter: drop-shadow(0px 0px 1px rgba(90, 45, 15, 0.5)); 
}

/* --- GUÍA DE HIELO --- */
#iceGuideContainer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-circle {
    border: 1px dashed #999;
    border-radius: 50%;
    position: relative;
    transition: width 0.3s ease, height 0.3s ease;
}

#iceCircleLabel {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #999;
    font-weight: bold;
    white-space: nowrap;
}

#logoImg.dragging {
    cursor: grabbing; 
}

.info-text {
    background-color: rgba(255, 243, 230, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid #ffd1a3;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95em;
    color: #444;
    margin: 15px auto;
    max-width: 380px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-text p {
    margin: 5px 0;
}

.info-box {
    background-color: rgba(255, 255, 255, 0.7);
    border-left: 4px solid #ff6600;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 0.88em;
    color: #555;
    margin-top: 15px;
    line-height: 1.5;
    text-align: left;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.info-box strong {
    color: #ff6600;
}

#controlsContainer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    margin-top: 20px;
}

.control-group {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 2px 0;
    width: 100%;
    max-width: 320px;
}

.control-group span {
    font-size: 0.9em;
    font-weight: bold;
    color: #555;
    text-transform: uppercase;
    flex: 1;
    text-align: left;
}

.btn-row {
    display: flex;
    gap: 12px;
}

#logoControls {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    align-items: center;
    transition: all 0.3s ease;
}

.radio-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    margin-top: -10px;
    margin-bottom: 30px;
}

.dynamic-subtitle {
    color: #444;
    font-size: 1.05em;
    margin-top: -15px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #00c853;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

footer {
    margin-top: 50px;
    padding: 40px 20px;
    background-color: rgba(51, 51, 51, 0.95);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    font-size: 0.9em;
}

.footer-container {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-container h3 {
    color: #ff6600;
    margin-bottom: 20px;
}

.footer-container ul {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.footer-container ul li {
    margin: 8px 0;
}

.footer-container a {
    color: white;
    text-decoration: none;
}

.footer-container a:hover {
    text-decoration: underline;
}

.whatsapp-btn {
    display: inline-block;
    background-color: #25d366;
    color: white !important;
    padding: 11px 22px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1em;
    text-decoration: none !important;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.whatsapp-btn:hover {
    background-color: #128c7e;
    transform: scale(1.05);
}

.download-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 9px 18px;
    font-size: 0.9em;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 20px;
    width: 100%;
    font-weight: bold;
}

.download-btn:hover {
    background-color: #0056b3;
}

/* --- LOADING OVERLAY (ATOMIC STYLE) --- */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.atom-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    margin-bottom: 40px;
}

.nucleus {
    width: 100px;
    height: 100px;
    z-index: 10;
    border-radius: 50%; /* Clip corners */
    object-fit: cover;
    filter: drop-shadow(0 0 20px rgba(255, 102, 0, 0.4));
    animation: nucleus-pulse 2s ease-in-out infinite;
}

.orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(255, 102, 0, 0.15);
    transform-style: preserve-3d;
}

.orbit-1 { transform: rotateX(75deg) rotateY(10deg); }
.orbit-2 { transform: rotateX(75deg) rotateY(130deg); }
.orbit-3 { transform: rotateX(75deg) rotateY(250deg); }

.electron {
    width: 45px;
    height: 45px;
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%; /* Clip corners */
    object-fit: cover;
    filter: drop-shadow(0 0 10px rgba(255, 102, 0, 0.3));
}

.orbit-1 .electron { animation: orbit1 3s linear infinite; }
.orbit-2 .electron { animation: orbit2 2.5s linear infinite; }
.orbit-3 .electron { animation: orbit3 3.5s linear infinite; }

#loadingOverlay p {
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0;
    text-align: center;
    font-family: inherit;
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

/* Animations */
@keyframes nucleus-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes orbit1 {
    from { transform: translate(-50%, -50%) rotate(0deg) translateX(150px) rotateZ(0deg) rotateX(-75deg); }
    to { transform: translate(-50%, -50%) rotate(360deg) translateX(150px) rotateZ(-360deg) rotateX(-75deg); }
}

@keyframes orbit2 {
    from { transform: translate(-50%, -50%) rotate(0deg) translateX(150px) rotateZ(0deg) rotateX(-75deg); }
    to { transform: translate(-50%, -50%) rotate(360deg) translateX(150px) rotateZ(-360deg) rotateX(-75deg); }
}

@keyframes orbit3 {
    from { transform: translate(-50%, -50%) rotate(0deg) translateX(150px) rotateZ(0deg) rotateX(-75deg); }
    to { transform: translate(-50%, -50%) rotate(360deg) translateX(150px) rotateZ(-360deg) rotateX(-75deg); }
}
