:root {
    --primary-color: #6366f1;
    --primary-hover-color: #818cf8;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f1f5f9;
    --sub-text-color: #94a3b8;
    --border-color: #334155;
    --accent-color: #a855f7;
    --success-color: #22c55e;
    --radius: 12px;
}

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

body {
    font-family: 'Plus Jakarta Sans', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    max-width: 800px;
    width: 100%;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--sub-text-color);
}

.upload-section {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.02);
}

.upload-section:hover, .upload-section.dragover {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.05);
}

.upload-content .icon-wrapper {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-content .main-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.upload-content .sub-text {
    color: var(--sub-text-color);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

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

.btn-large {
    flex: 1;
    font-size: 1.1rem;
    padding: 16px;
}

.editor-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: fadeIn 0.5s ease;
}

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

.preview-area {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 30px;
}

.canvas-wrapper {
    background-color: #000;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
}

#main-canvas {
    max-width: 100%;
    max-height: 100%;
}

.info-panel h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.favicon-previews {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--sub-text-color);
}

.preview-box {
    border-radius: 4px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

#preview-16 { width: 16px; height: 16px; }
#preview-32 { width: 32px; height: 32px; }
#preview-48 { width: 48px; height: 48px; }

.bg-grid {
    background-image: 
        linear-gradient(45deg, #111 25%, transparent 25%), 
        linear-gradient(-45deg, #111 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #111 75%), 
        linear-gradient(-45deg, transparent 75%, #111 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px 5px, 5px 0;
    background-color: #1e293b;
}

.controls-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 0.95rem;
}

.size-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.2s;
}

.checkbox-container:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-container input {
    margin-right: 8px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.85rem;
    color: var(--sub-text-color);
}

@media (max-width: 600px) {
    .app-container {
        padding: 20px;
    }

    .preview-area {
        grid-template-columns: 1fr;
    }

    .info-panel {
        order: -1;
    }

    .favicon-previews {
        flex-direction: row;
        justify-content: center;
    }

    .header h1 {
        font-size: 1.75rem;
    }
}
