:root {
    --bg-dark: #0f172a;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
}

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

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

/* 움직이는 배경 그라데이션 */
.background-animation {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%);
    animation: drift 20s infinite linear alternate;
    z-index: -1;
}

@keyframes drift {
    0% { transform: rotate(0deg) translate(0, 0); }
    100% { transform: rotate(10deg) translate(-5%, -5%); }
}

/* 글래스모피즘 공통 클래스 */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hidden {
    display: none !important;
}

/* PIN 모달 */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.pin-container {
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.icon-lock {
    font-size: 48px;
    margin-bottom: 16px;
}

.pin-container h2 {
    margin-bottom: 8px;
    font-weight: 600;
}

.pin-container p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* PIN Display */
.pin-display {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.pin-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--glass-border);
    transition: all 0.3s ease;
}

.pin-dot.filled {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

/* Keypad */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 240px;
    margin: 0 auto 20px;
}

.key {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px 0;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.1s ease;
}

.key:hover {
    background: rgba(255, 255, 255, 0.1);
}

.key:active {
    transform: scale(0.95);
    background: var(--primary);
}


.error-msg {
    color: var(--error) !important;
    font-size: 0.85rem !important;
    height: 20px;
}

/* 메인 화면 */
#main-content {
    width: 100%;
    max-width: 900px;
    padding: 40px 20px;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.status-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* 드롭존 */
.dropzone {
    padding: 60px 40px;
    text-align: center;
    border: 2px dashed var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.dropzone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.dropzone:hover .upload-icon {
    transform: translateY(-5px);
}

.dropzone h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.dropzone p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* 업로드 리스트 */
.status-container {
    margin-top: 30px;
}

.status-container h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.upload-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: slideLeft 0.4s ease;
}

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

.item-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.file-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.file-status {
    color: var(--primary);
    font-weight: 600;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    width: 0%;
    transition: width 0.3s ease;
}

.success-text {
    color: var(--success) !important;
}
