:root {
    --bg-color: #03030b;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-glow: #5e6aff;
    --accent-secondary: #9d4eff;
    --panel-bg: rgba(20, 20, 35, 0.6);
    --input-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Ambient Light Effect */
.ambient-light {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(94, 106, 255, 0.25) 0%, rgba(3, 3, 11, 0) 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    padding-top: calc(2rem + env(safe-area-inset-top)); /* Mobile Status Bar Fix */
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #fff, #a0a0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(90deg, #8e9aff, #d49eff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Interface Container */
.interface-container {
    width: 100%;
    max-width: 500px;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    margin-bottom: 4rem;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 2rem;
    background: var(--input-bg);
    padding: 5px;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #2a2a40;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Panels */
.panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.panel.active {
    display: block;
}

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

/* Inputs */
.input-group {
    margin-bottom: 1.2rem;
}

input[type="text"], 
input[type="password"],
textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-glow);
}

/* File Upload */
.file-drop-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    transition: 0.2s;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.02);
}

.file-drop-area.is-active {
    background-color: rgba(94, 106, 255, 0.1);
    border-color: var(--accent-glow);
}

.fake-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 16px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.file-msg {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    opacity: 0;
}

.image-preview {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    max-height: 200px;
    display: flex;
    justify-content: center;
    background: #000;
    border: 1px solid var(--border-color);
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.hidden {
    display: none !important;
}

/* Action Button */
.action-btn {
    position: relative;
    width: 100%;
    padding: 1rem;
    background: #ffffff;
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.02);
}

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

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.action-btn:hover .btn-glow {
    opacity: 0.2;
}

/* Results */
.result-area {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    animation: fadeIn 0.5s;
}

.result-area h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.download-link {
    display: inline-block;
    background: rgba(94, 106, 255, 0.2);
    color: #8e9aff;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid rgba(94, 106, 255, 0.3);
    transition: all 0.3s;
}

.download-link:hover {
    background: rgba(94, 106, 255, 0.4);
    box-shadow: 0 0 15px rgba(94, 106, 255, 0.3);
}

.message-box {
    background: #000;
    border: 1px solid #333;
    padding: 1rem;
    border-radius: 8px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

/* Loader */
.loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    nav { 
        padding: 1.5rem;
        padding-top: calc(2rem + env(safe-area-inset-top));
    }
}
