﻿:root {
    --bg-primary: #141414;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --red-primary: #ff4757;
    --blue-primary: #3742fa;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(255, 255, 255, 0.15);
    --accent-blue: #4285f4;
    --shadow-primary: rgba(0, 0, 0, 0.25);
    --red-up: #fa4646;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px) saturate(120%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10000;
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(0.85) translateY(40px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* 미묘한 그라데이션 테두리 효과 */
.modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 16px 16px 0 0;
}

/* 헤더 영역 */
.modal-header {
    text-align: center;
    margin-bottom: 24px;
    display: block;
}

.modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px auto;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    position: relative;
    backdrop-filter: blur(10px);
}

    .modal-icon::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 16px;
        padding: 1px;
        background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        mask-composite: subtract;
    }

    .modal-icon.info, .modal-icon.success, .modal-icon.warning, .modal-icon.error {
        color: #fff;
    }

.modal-title {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.modal-message {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 28px;
    white-space: pre-line;
}

.modal-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 24px;
    transition: all 0.25s ease;
    outline: none;
    font-family: inherit;
}

    .modal-input:focus {
        border-color: var(--red-up);
        box-shadow: 0 6px 20px rgba(250, 70, 70, 0.1);
        background: var(--bg-secondary);
    }

    .modal-input::placeholder {
        color: var(--text-muted);
    }

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 90px;
    font-family: inherit;
    letter-spacing: -0.01em;
}

    /* 버튼 호버 시 샤인 효과 */
    .modal-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
        transition: left 0.6s ease;
    }

    .modal-btn:hover::before {
        left: 100%;
    }

.btn-primary {
    background: linear-gradient(135deg, var(--red-up), #e03e52);
    color: #fff;
    box-shadow: 0 6px 20px rgba(250, 70, 70, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 25px rgba(250, 70, 70, 0.5);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

    .btn-secondary:hover {
        background: var(--border-focus);
        color: var(--text-primary);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    }

    .btn-secondary:active {
        transform: translateY(0);
    }

.demo-bg {
    min-height: 100vh;
    background: radial-gradient(circle at 25% 25%, rgba(66, 133, 244, 0.1) 0%, transparent 50%), radial-gradient(circle at 75% 75%, rgba(255, 71, 87, 0.1) 0%, transparent 50%), var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.demo-title {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    letter-spacing: -0.02em;
}

.demo-btn {
    padding: 12px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 200px;
    backdrop-filter: blur(10px);
}

    .demo-btn:hover {
        background: var(--bg-tertiary);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

/* 반응형 */
@media (max-width: 480px) {
    .modal-container {
        margin: 20px;
        padding: 24px;
        border-radius: 20px;
    }

    .modal-buttons {
        flex-direction: column-reverse;
    }

    .modal-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-title {
        font-size: 18px;
    }
}

/* 스크롤바 스타일링 */
.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.modal-container::-webkit-scrollbar-thumb {
    background: var(--border-focus);
    border-radius: 3px;
}

    .modal-container::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted);
    }
