:root {
    --bg-color: #0b0f19;
    --panel-bg: rgba(18, 24, 38, 0.65);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #00e676; /* Emerald accent */
    --primary-hover: #00c853;
    --secondary-color: #00b0ff; /* Cyan accent */
    --success-color: #10b981;
    --error-color: #ef4444;
    --input-bg: rgba(15, 23, 42, 0.5);
    --input-border: rgba(255, 255, 255, 0.12);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Dynamic background */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-color), transparent 70%);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary-color), transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: -10s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #651fff, transparent 70%);
    bottom: 20%;
    left: 20%;
    animation-duration: 25s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 650px;
    padding: 3rem;
    position: relative;
    z-index: 1;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.logo-icon {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.5));
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header h1 span {
    font-weight: 300;
    color: var(--secondary-color);
    -webkit-text-fill-color: var(--secondary-color);
}

header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 400;
}

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

.form-group > label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* File Upload Area */
.file-upload {
    border: 2px dashed var(--input-border);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    background: var(--input-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.file-upload:hover, .file-upload.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 230, 118, 0.05);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.1);
}

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

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.upload-icon {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.file-upload:hover .upload-icon, .file-upload.dragover .upload-icon {
    color: var(--primary-color);
    transform: translateY(-2px);
}

#fileName {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    word-break: break-all;
}

.file-upload.has-file #fileName {
    color: var(--primary-color);
    font-weight: 600;
}

/* Select Inputs */
.conversion-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.col {
    flex: 1;
}

.arrow-col {
    flex: 0 0 auto;
    padding-bottom: 12px;
}

.arrow-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
}

.select-wrapper {
    position: relative;
}

select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.2);
}

select option {
    background: var(--bg-color);
    color: var(--text-primary);
    padding: 12px;
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Button */
.primary-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), #00c853);
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
}

.primary-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 230, 118, 0.4);
    filter: brightness(1.1);
}

.primary-btn:disabled {
    background: var(--input-bg);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
    border: 1px solid var(--input-border);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 176, 255, 0.1);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid rgba(0, 176, 255, 0.3);
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.secondary-btn:hover {
    background: rgba(0, 176, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 176, 255, 0.2);
}

/* Status Area */
.status-area {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    animation: fadeIn 0.3s ease;
}

.status-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

#statusMsg {
    font-weight: 500;
}

#statusMsg.error {
    color: var(--error-color);
}

#statusMsg.success {
    color: var(--primary-color);
}

/* Utilities */
.hidden {
    display: none !important;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
    }
    
    .conversion-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .arrow-col {
        display: flex;
        justify-content: center;
        padding: 10px 0;
    }
    
    .arrow-circle svg {
        transform: rotate(90deg);
    }
}
