:root {
    color-scheme: dark;
    --bg-color: #0d0f12;
    --text-primary: #ffffff;
    --text-secondary: #a0a5b1;
    --accent-primary: #ff66aa;
    --accent-hover: #ff88bb;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.background-effects {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

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

.orb-1 {
    width: 400px;
    height: 400px;
    background: #ff66aa;
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #5533ff;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

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

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    z-index: 1;
}

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

header h1 {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -1px;
}

header h1 span {
    color: var(--accent-primary);
}

header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
}

.file-drop-area {
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.file-drop-area:hover, .file-drop-area.dragover {
    border-color: var(--accent-primary);
    background: rgba(255, 102, 170, 0.05);
}

.drop-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.drop-msg {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-secondary);
}

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

.settings {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.setting-group {
    flex: 1 1 calc(50% - 0.75rem);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.setting-group:nth-child(3) {
    flex: 1 1 100%;
}

.setting-group label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    appearance: none;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

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

select:focus {
    border-color: var(--accent-primary);
}

.advanced-settings {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.advanced-settings summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    outline: none;
    user-select: none;
    transition: color 0.3s;
}

.advanced-settings summary:hover {
    color: var(--text-primary);
}

.settings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.setting-group.full-width {
    flex: 1 1 100%;
}

.setting-group.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.setting-group.checkbox-group label {
    margin-bottom: 0;
}

.file-input, .text-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    width: 100%;
}

.file-input::file-selector-button {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 1rem;
    font-weight: bold;
    transition: background 0.3s;
}

.file-input::file-selector-button:hover {
    background: var(--accent-hover);
}

.text-input:focus {
    border-color: var(--accent-primary);
}

button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#submitBtn {
    background: var(--accent-primary);
    color: white;
}

#uploadSkinBtn {
    width: auto;
    background: var(--accent-primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

#submitBtn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 102, 170, 0.3);
}

#submitBtn:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    display: block;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-text-only {
    background: none;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.btn-text-only:hover {
    color: white;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: var(--surface-bg);
    border-radius: 6px;
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.progress-bar {
    height: 100%;
    background: var(--accent-primary);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-primary);
}

.hidden {
    display: none !important;
}

.status-area, .result-area, .error-area {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.status-area p {
    margin-top: 1.5rem;
    font-size: 1.2rem;
}

.status-subtext {
    color: var(--text-secondary);
    font-size: 0.9rem !important;
    margin-top: 0.5rem !important;
}

.styled-video {
    border-radius: 12px;
    margin-top: 1.5rem;
    background: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.error-area {
    color: #ff4444;
}

.error-area p {
    margin-bottom: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 102, 170, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    margin: 0 auto;
    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); }
}

@media (max-width: 768px) {
    .glass-panel {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: #1a1d24;
    }
}
