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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

/* Animated particles background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(88,101,242,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(88,101,242,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139,92,246,0.08) 0%, transparent 50%);
    z-index: 0;
    animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Glass effect with animation */
.glass {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.glass:hover {
    border-color: rgba(88,101,242,0.3);
    box-shadow: 0 0 30px rgba(88,101,242,0.1);
}

/* Header animations */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 30px;
    background: rgba(255,255,255,0.03);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    animation: slideDown 0.5s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #5865F2, #4752C4);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    20%, 100% { transform: translateX(100%) rotate(45deg); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(88,101,242,0.4); }
    50% { box-shadow: 0 0 0 15px rgba(88,101,242,0); }
}

.logo-icon i {
    font-size: 28px;
    color: white;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #a0a0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.logo span {
    background: linear-gradient(135deg, #5865F2, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Badge group for multiple badges */
.badge-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.badge {
    background: linear-gradient(135deg, #5865F2, #4752C4);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: badgePulse 2s infinite;
}

.download-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: inherit;
}

.download-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16,185,129,0.3);
}

.theme-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.theme-toggle:hover {
    background: rgba(88,101,242,0.3);
    transform: rotate(15deg);
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    max-width: 450px;
    width: 90%;
    padding: 0;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header i {
    font-size: 24px;
    color: #10b981;
}

.modal-header h3 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    color: #f87171;
    transform: scale(1.1);
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin-bottom: 20px;
    color: #a0a0a0;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.download-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
}

.download-option:hover {
    background: rgba(16,185,129,0.15);
    border-color: #10b981;
    transform: translateX(5px);
}

.download-option i:first-child {
    font-size: 28px;
    color: #10b981;
}

.download-option span {
    flex: 1;
    font-weight: 500;
}

.download-option i:last-child {
    color: #6b7280;
    transition: all 0.3s;
}

.download-option:hover i:last-child {
    color: #10b981;
    transform: translateX(5px);
}

.download-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.download-info small {
    color: #6b7280;
    font-size: 12px;
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 25px;
    animation: fadeIn 0.6s ease;
}

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

.input-panel, .log-panel {
    padding: 25px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.panel-title i {
    font-size: 24px;
    color: #5865F2;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.panel-title h2 {
    font-size: 18px;
    font-weight: 600;
}

/* Input Groups */
.input-group {
    margin-bottom: 20px;
    animation: fadeInUp 0.4s ease;
    animation-fill-mode: both;
}

.input-group:nth-child(1) { animation-delay: 0.1s; }
.input-group:nth-child(2) { animation-delay: 0.2s; }
.input-group:nth-child(3) { animation-delay: 0.3s; }

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #a0a0a0;
}

.input-group label i {
    margin-right: 8px;
    color: #5865F2;
}

.glow-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.glow-input:focus {
    outline: none;
    border-color: #5865F2;
    box-shadow: 0 0 20px rgba(88,101,242,0.3);
    background: rgba(0,0,0,0.6);
    transform: scale(1.01);
}

.input-hint {
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px;
    margin-left: 4px;
    animation: hintPulse 2s infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.time-estimate {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    margin-top: 10px;
}

.time-estimate i {
    color: #fbbf24;
}

.time-estimate span {
    color: #a0a0a0;
}

.progress-container {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    height: 6px;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #5865F2, #8b5cf6, #a855f7);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
    animation: progressGlow 1.5s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

#progressText {
    position: absolute;
    right: 0;
    top: -18px;
    font-size: 10px;
    color: #6b7280;
}

/* Light Theme */
body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

body.light-theme .glass {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.1);
}

body.light-theme .header,
body.light-theme .input-panel,
body.light-theme .log-panel {
    background: rgba(255,255,255,0.7);
}

body.light-theme .logo h1 {
    background: linear-gradient(135deg, #1a1a2e, #2d2d5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .panel-title h2,
body.light-theme .input-group label,
body.light-theme .log-text,
body.light-theme .status-card span {
    color: #1a1a2e;
}

body.light-theme .glow-input {
    background: rgba(255,255,255,0.9);
    border-color: rgba(0,0,0,0.1);
    color: #1a1a2e;
}

body.light-theme .glow-input:focus {
    border-color: #5865F2;
    box-shadow: 0 0 20px rgba(88,101,242,0.2);
}

body.light-theme .log-container {
    background: rgba(255,255,255,0.5);
}

body.light-theme .log-line {
    background: rgba(0,0,0,0.03);
}

body.light-theme .log-line:hover {
    background: rgba(0,0,0,0.08);
}

body.light-theme .log-text {
    color: #2d2d5e;
}

body.light-theme .status-card {
    background: rgba(255,255,255,0.6);
}

body.light-theme .time-estimate {
    background: rgba(0,0,0,0.08);
}

body.light-theme .time-estimate span {
    color: #4b5563;
}

body.light-theme .progress-container {
    background: rgba(0,0,0,0.1);
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.option-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.5s ease;
    animation-fill-mode: both;
}

.option-card:nth-child(1) { animation-delay: 0.05s; }
.option-card:nth-child(2) { animation-delay: 0.1s; }
.option-card:nth-child(3) { animation-delay: 0.15s; }
.option-card:nth-child(4) { animation-delay: 0.2s; }

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

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88,101,242,0.2), transparent);
    transition: left 0.5s;
}

.option-card:hover::before {
    left: 100%;
}

.option-card:hover {
    background: rgba(88,101,242,0.1);
    border-color: rgba(88,101,242,0.3);
    transform: translateX(5px);
}

.option-card.selected {
    background: rgba(88,101,242,0.15);
    border-color: #5865F2;
    box-shadow: 0 0 15px rgba(88,101,242,0.2);
    animation: selectedPulse 0.5s ease;
}

@keyframes selectedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.option-icon i {
    font-size: 22px;
    color: #5865F2;
}

.option-card span {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
}

.checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    transition: all 0.2s;
}

.option-card.selected .checkbox {
    background: #5865F2;
    border-color: #5865F2;
    position: relative;
    animation: checkPop 0.3s ease;
}

@keyframes checkPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.option-card.selected .checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: white;
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.preset-btn {
    flex: 1;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #a0a0a0;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.preset-btn:hover {
    background: rgba(88,101,242,0.2);
    border-color: #5865F2;
    color: white;
    transform: translateY(-2px);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #5865F2, #3b82f6);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(88,101,242,0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover .btn-glow {
    left: 100%;
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.btn-clear {
    background: rgba(255,255,255,0.05);
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.3s;
}

.btn-clear:hover {
    background: rgba(239,68,68,0.2);
    transform: scale(1.05);
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

.btn-clear i {
    color: #f87171;
    font-size: 14px;
}

/* Status Card */
.status-card {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    animation: statusGlow 2s infinite;
}

@keyframes statusGlow {
    0%, 100% { background: rgba(0,0,0,0.3); }
    50% { background: rgba(0,0,0,0.4); }
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* Console Log - CLEAN MODERN STYLE */
.log-container {
    height: 500px;
    overflow-y: auto;
    background: rgba(0,0,0,0.3);
    border-radius: 16px;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

.log-line {
    padding: 10px 14px;
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    transition: all 0.2s;
    animation: logSlideIn 0.3s ease;
}

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

.log-line:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(5px);
}

.log-prompt {
    min-width: 28px;
    font-weight: 600;
    font-size: 13px;
    font-family: monospace;
}

.log-text {
    flex: 1;
    word-break: break-word;
    font-weight: 400;
}

/* Different log types - clean colors */
.log-line.info .log-prompt { color: #60a5fa; }
.log-line.info .log-text { color: #cbd5e1; }

.log-line.success .log-prompt { color: #4ade80; }
.log-line.success .log-text { color: #86efac; }

.log-line.error .log-prompt { color: #f87171; }
.log-line.error .log-text { color: #fca5a5; }

.log-line.warning .log-prompt { color: #fbbf24; }
.log-line.warning .log-text { color: #fde047; }

.log-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
}

.log-footer i {
    animation: footerPulse 1.5s infinite;
}

@keyframes footerPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #5865F2;
    border-radius: 10px;
    transition: all 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: #4752C4;
    width: 10px;
}

/* Loading animation for button */
.btn-primary i.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 15px;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        text-align: center;
    }
    
    .badge-group {
        justify-content: center;
    }
    
    .logo {
        justify-content: center;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .logo-icon i {
        font-size: 22px;
    }
    
    .input-panel, .log-panel {
        padding: 15px;
    }
    
    .panel-title h2 {
        font-size: 16px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .log-container {
        height: 350px;
        font-size: 11px;
        padding: 12px;
    }
    
    .log-line {
        padding: 8px 10px;
    }
    
    .log-prompt {
        min-width: 22px;
        font-size: 11px;
    }
    
    .glow-input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .preset-buttons {
        flex-wrap: wrap;
    }
    
    .preset-btn {
        font-size: 11px;
        padding: 6px;
    }
    
    .badge {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .download-option {
        padding: 12px 15px;
    }
    
    .download-option i:first-child {
        font-size: 24px;
    }
    
    .time-estimate {
        font-size: 10px;
        padding: 6px 12px;
    }
    
    /* Touch-friendly buttons */
    .option-card,
    .preset-btn,
    .btn-primary,
    .btn-secondary,
    .btn-clear,
    .download-badge,
    .theme-toggle {
        cursor: pointer;
        min-height: 44px;
    }
    
    .option-card {
        min-height: 50px;
    }
    
    .checkbox {
        width: 28px;
        height: 28px;
    }
}

/* Extra small devices (phones under 480px) */
@media (max-width: 480px) {
    .log-container {
        height: 300px;
        font-size: 10px;
    }
    
    .log-prompt {
        min-width: 20px;
    }
    
    .option-card {
        padding: 10px;
    }
    
    .option-icon i {
        font-size: 18px;
    }
    
    .option-card span {
        font-size: 12px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 10px;
        font-size: 13px;
    }
    
    .status-card {
        font-size: 11px;
        padding: 10px 12px;
    }
    
    .input-hint {
        font-size: 10px;
    }
}

/* Success message animation */
@keyframes successFlash {
    0% { background: rgba(74,222,128,0); }
    50% { background: rgba(74,222,128,0.2); }
    100% { background: rgba(74,222,128,0); }
}

.success-flash {
    animation: successFlash 0.5s ease;
}

/* Error shake animation */
@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-shake {
    animation: errorShake 0.3s ease;
}