*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-color: #09090b;
    --panel-bg: rgba(24, 24, 27, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --primary: #10b981;
    --primary-dark: #059669;
    --neon-orange: #f59e0b;
    --neon-green: #10b981;
    --neon-pink: #ec4899;
    --neon-cyan: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: rgba(39, 39, 42, 0.5);
    --card-hover: rgba(63, 63, 70, 0.7);
    --glass-blur: blur(16px);
    --glow-color: rgba(16, 185, 129, 0.15);
    
    --success: #059669;
    --border: rgba(255, 255, 255, 0.08);
    --label: #cbd5e1;
    --notice-bg: rgba(6, 78, 59, 0.5);
    --notice-text: #a7f3d0;
    --notice-border: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
}

body {
    -webkit-user-select: none;
    user-select: none;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

body::before,
body::after {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    pointer-events: none;
    will-change: transform;
}

body::before {
    background-image: radial-gradient(circle at 50% 50%, var(--glow-color), transparent 25%);
    animation: floatSpotGreen 300s ease-in-out infinite alternate;
}

body::after {
    background-image: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.1), transparent 25%);
    animation: floatSpotBlue 350s ease-in-out infinite alternate-reverse;
}

@keyframes floatSpotGreen {
    0% { transform: translate(-20%, 0%) scale(1); }
    20% { transform: translate(10%, 20%) scale(1.2); }
    40% { transform: translate(25%, -15%) scale(0.9); }
    60% { transform: translate(-10%, -25%) scale(1.1); }
    80% { transform: translate(-25%, 15%) scale(0.85); }
    100% { transform: translate(15%, 5%) scale(1.15); }
}

@keyframes floatSpotBlue {
    0% { transform: translate(20%, -10%) scale(1); }
    25% { transform: translate(-15%, 15%) scale(1.15); }
    50% { transform: translate(-25%, -20%) scale(0.85); }
    75% { transform: translate(10%, 25%) scale(1.2); }
    100% { transform: translate(25%, 0%) scale(0.95); }
}

input,
textarea {
    -webkit-user-select: auto;
    user-select: auto;
}

.main-wrapper {
    width: 100%;
    max-width: 800px;
    z-index: 10;
}

/* --- HEADER CONTROLS --- */
.header-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}
.btn-header-contact {
    cursor: pointer;
    height: 38px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: var(--glass-blur);
    text-decoration: none;
}
.btn-header-contact:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.lang-select {
    height: 38px;
    box-sizing: border-box;
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    color: var(--text-main);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    outline: 0;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23cbd5e1" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position-x: 95%;
    background-position-y: center;
    padding-right: 2rem;
}

.lang-select:focus, .lang-select:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.lang-select option {
    background: #18181b;
    color: var(--text-main);
}

/* --- PANEL CONTAINER --- */
.container {
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    position: relative;
    display: flex;
    flex-direction: column;
}

h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 800;
    font-size: 2.5rem;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

h1 span {
    display: inline-block;
    position: relative;
    animation: pulse-title-dot 2s infinite ease-in-out;
    color: var(--neon-green);
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.notice {
    background: var(--notice-bg);
    color: var(--notice-text);
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    border: 1px solid var(--notice-border);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: inset 0 0 15px rgba(16, 185, 129, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--label);
    font-size: 0.95rem;
}

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

input[type=text]:focus {
    outline: 0;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}


.file-input-wrapper {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
    flex-wrap: wrap;
    gap: 10px;
}

/* wrapper hover removed */

input[type=file] {
    flex: 1;
    border: none;
    background: 0 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: normal;
}

input[type=file]::-webkit-file-upload-button,
input[type=file]::file-selector-button {
    display: none;
    -webkit-appearance: none;
}

.custom-file-btn {
    display: inline-block;
    background: var(--card-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    outline: 0;
    white-space: nowrap;
    -webkit-user-select: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-right: 1rem;
    transition: all 0.3s;
    flex-shrink: 0;
}

.custom-file-btn:hover {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    background: transparent;
    color: var(--neon-green);
    border-color: var(--neon-green);
}

.reset-file-btn {
    position: absolute;
    right: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.3s;
    padding: 0;
    z-index: 10;
}
.reset-file-btn:hover {
    background: var(--danger);
    color: white;
}


.btn {
    background: transparent;
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.98);
}

.btn-success {
    background: rgba(5, 150, 105, 0.2);
    border-color: var(--success);
    color: var(--text-main);
}

.btn-success:hover {
    background: var(--success);
    color: white;
}

#download-area {
    display: none;
    margin-top: 2rem;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

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

#error-msg {
    color: var(--danger);
    font-weight: 700;
    margin-top: 1rem;
    display: none;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

#success-msg {
    color: var(--neon-green);
    font-weight: 700;
    margin-top: 1rem;
    display: none;
    text-align: center;
    background: rgba(16, 185, 129, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* --- INFO SECTION --- */
.info-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--panel-border);
}

.info-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-top: 0;
}

.info-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.info-section p:last-child {
    margin-bottom: 0;
}

/* --- CROSS PROMO --- */
.cross-promo {
    margin-top: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.cross-promo a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    width: 100%;
    justify-content: center;
}

.cross-promo a:hover {
    color: var(--neon-green);
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
    transform: translateY(-2px);
}

.cross-promo svg {
    width: 20px;
    height: 20px;
    color: currentColor;
}

/* --- FOOTER --- */
.site-footer {
    margin-top: 4rem;
    padding: 2rem 1rem 1rem;
    border-top: 1px solid var(--panel-border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}









.footer-msg {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.heart {
    color: var(--neon-pink);
    display: inline-block;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    10% { transform: scale(1.1); }
    20% { transform: scale(1); }
}

.notice svg {
    flex-shrink: 0;
}
@media (max-width: 768px) {
    body { padding: 1rem 0.5rem; }
    .container { padding: 1.5rem; }
    h1 { font-size: 2rem; }
    .subtitle { font-size: 1rem; margin-bottom: 1.5rem; }
    .info-section { margin-top: 2rem; padding: 1.5rem; }
    .site-footer { margin-top: 2rem; padding: 1.5rem 0.5rem 1rem; }
    .notice { flex-direction: column; text-align: center; padding: 1rem; gap: 8px; }
}



@keyframes pulse-title-dot {
    0% { text-shadow: 0 0 2px rgba(16, 185, 129, 0.5); }
    50% { text-shadow: 0 0 15px rgba(16, 185, 129, 1); }
    100% { text-shadow: 0 0 2px rgba(16, 185, 129, 0.5); }
}


.custom-select-wrapper {
    position: relative;
}
.custom-select-trigger {
    padding: 0.5rem 1rem;
    padding-right: 2.2rem;
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3) url('data:image/svg+xml;utf8,<svg fill="%23cbd5e1" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 0.5rem center;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
    height: 38px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    backdrop-filter: var(--glass-blur);
}

.custom-select-trigger:focus, .custom-select-wrapper.open .custom-select-trigger {
    outline: 0;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}
.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 100%;
    background: #18181b;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    overflow: hidden;
    z-index: 100;
    display: none;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}
.custom-select-wrapper.open .custom-select-options {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}
.custom-option {
    padding: 0.8rem 1rem;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.2s, color 0.2s;
    font-size: 0.85rem;
    white-space: nowrap;
    text-align: right;
}
select.input-algo ~ .custom-select-options .custom-option {
    font-size: 0.95rem;
    text-align: left;
    padding: 1rem;
}
.custom-option:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--neon-green);
}
.custom-option.selected {
    background: rgba(16, 185, 129, 0.15);
    color: var(--neon-green);
    font-weight: bold;
}


/* Centering language dropdown */
select.lang-select + .custom-select-trigger {
    justify-content: center;
    padding-right: 1.5rem !important;
    background-position: right 0.4rem center !important;
}
select.lang-select ~ .custom-select-options .custom-option {
    text-align: center !important;
}
/* Enforce button hover */
.btn-header-contact {
    outline: none;
    font-family: inherit;
}
.btn-header-contact:hover {
    color: var(--neon-cyan) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2) !important;
}
.custom-select-trigger:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}


/* Fix header dropdowns width (especially for Izihash) */

.contact-dropdown .custom-select-trigger {
    background-image: none !important;
    padding-right: 1rem !important;
}


/* Unified Header Trigger Backgrounds */
.header-controls .custom-select-trigger {
    background-color: var(--panel-bg) !important;
}
/* Ensure wrapper doesn't have hover halo on inputs */
.file-input-wrapper:focus-within, .file-input-wrapper:hover {
    border-color: var(--panel-border) !important;
}

/* Force hide native selects that are replaced */
select.input-algo, select.lang-select { display: none !important; }

/* Center Header Dropdowns */
.header-controls .custom-select-options {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}
