* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    min-height: 100vh;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
}

.app-container {
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
    letter-spacing: -1px;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 1rem;
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

input[type="password"] {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="password"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.help-text {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.5rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn.primary {
    background: #667eea;
    color: #fff;
}

.btn.primary:hover {
    background: #5a6fd6;
    transform: translateY(-1px);
}

.btn.secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn.secondary:hover {
    background: #cbd5e1;
}

.btn.excel {
    background: #10B981;
    color: white;
}

.btn.excel:hover {
    background: #059669;
}

.glowing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.glowing:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}


/* Drop Zone */
.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.drop-zone.dragover {
    border-color: #667eea;
    background: #eff6ff;
}

.drop-zone:hover {
    background: #eff6ff;
    border-color: #a5b4fc;
}

.drop-zone .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.drop-zone p {
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1.5;
}

.drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.preview-container {
    margin-top: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.preview-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: contain;
}

.preview-container .btn {
    width: 100%;
    max-width: 300px;
}

/* Table */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

td {
    color: #1e293b;
    min-width: 100px;
}

/* Editable cells */
td[contenteditable="true"] {
    cursor: text;
    transition: background-color 0.2s;
}

td[contenteditable="true"]:hover {
    background-color: #f1f5f9;
}

td[contenteditable="true"]:focus {
    background-color: #e0f2fe;
    outline: 2px solid #38bdf8;
    outline-offset: -2px;
    border-radius: 4px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .app-container {
        padding: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .flex-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .btn.excel {
        width: 100%;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
