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

body {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 700;
}

.upload-section {
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.upload-area {
    border: 4px solid rgba(255,255,255,0.8);
    border-radius: 0;
    padding: 60px 20px;
    text-align: center;
    background: rgba(255,255,255,0.2);
    backdrop-filter: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.1);
}

.upload-area:hover {
    border-color: white;
    background: rgba(255,255,255,0.3);
    transform: none;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.2);
}

.upload-area.dragover {
    border-color: #4CAF50;
    background: rgba(76,175,80,0.3);
    box-shadow: inset 0 0 0 2px #4CAF50;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: white;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 8px;
    font-weight: 700;
}

.upload-hint {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 700;
}

.controls {
    background: rgba(40,40,40,0.95);
    border-radius: 0;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.3);
    animation: fadeInUp 0.8s ease-out 0.4s both;
    position: fixed;
    top: 20px;
    right: 20px;
    transform: none;
    z-index: 1000;
    width: 320px;
    height: calc(100vh - 40px);
    overflow-y: auto;
    border: 4px solid #666;
}

.control-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 700;
    color: white;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-group input[type="range"] {
    width: 100%;
    height: 20px;
    border-radius: 0;
    background: #222;
    outline: none;
    -webkit-appearance: none;
    border: 2px solid #666;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 0;
    background: white;
    cursor: pointer;
    border: 2px solid #333;
    box-shadow: none;
}

.control-group span {
    font-weight: 700;
    color: white;
    font-family: 'Source Sans Pro', sans-serif;
    background: #333;
    padding: 4px 8px;
    border: 1px solid #666;
}

.control-group select {
    padding: 8px;
    border: 2px solid #666;
    border-radius: 0;
    background: #222;
    color: white;
    font-size: 12px;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 700;
}

.download-btn {
    background: #333;
    color: white;
    border: 2px solid #666;
    padding: 12px 20px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Source Sans Pro', sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    width: 100%;
}

.download-btn:hover {
    transform: none;
    background: #555;
    border-color: white;
    box-shadow: inset 0 0 0 2px #333;
}

.preview-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.original-preview, .ascii-preview {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.original-preview h3, .ascii-preview h3 {
    margin-bottom: 15px;
    color: #333;
    font-weight: 700;
    text-align: center;
}

#originalImage {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
}

.ascii-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 100;
    overflow: hidden;
}

.ascii-output {
    font-family: 'Courier New', monospace;
    font-size: clamp(2px, 1vw, 8px);
    line-height: 1;
    color: #00ff00;
    padding: 10px;
    white-space: pre;
    word-wrap: break-word;
    width: 100%;
    height: 100%;
    margin: 0;
    background: #000;
    overflow: auto;
    text-align: center;
}

.ascii-output.color {
    color: unset;
}

.settings-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #333;
    color: white;
    border: 2px solid #666;
    border-radius: 0;
    padding: 12px 16px;
    font-size: 16px;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 700;
    cursor: pointer;
    z-index: 1001;
    box-shadow: none;
    transition: all 0.2s ease;
}

.settings-btn:hover {
    background: #555;
    border-color: white;
    transform: none;
}

.back-btn {
    position: fixed;
    top: 20px;
    left: 200px;
    background: #333;
    color: white;
    border: 2px solid #666;
    border-radius: 0;
    padding: 12px 16px;
    font-size: 16px;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 700;
    cursor: pointer;
    z-index: 1001;
    box-shadow: none;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #555;
    border-color: white;
    transform: none;
}

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

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

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .control-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .control-group label {
        min-width: auto;
    }
    
    .control-group input[type="range"],
    .control-group select {
        width: 100%;
        min-width: auto;
    }
    
    .ascii-output {
        font-size: 6px;
        padding: 10px;
    }
    
    .settings-btn {
        top: 10px;
        left: 10px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .back-btn {
        top: 10px;
        left: 10px;
        margin-top: 60px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .controls {
        top: 10px;
        right: 10px;
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        padding: 20px;
        box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
    }
}