/* 배경색 선택 기능 */
.color-picker-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.color-picker-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    font-size: 20px;
    color: #333;
}

.color-picker-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.color-picker-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 10px;
    display: none;
    min-width: 150px;
    backdrop-filter: blur(10px);
}

.color-picker-dropdown.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.color-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.color-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.3;
    border-radius: 8px;
}

.color-option span {
    position: relative;
    z-index: 1;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.color-option:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 로그인 페이지 전체 컨테이너 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 배경 애니메이션 효과 */
.login-background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: 3s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* 로그인 카드 */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 로그인 헤더 */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    margin-bottom: 20px;
}

.brand-text {
    font-size: 3.5rem;
    font-weight: 800;
    color: #2c3e50;
    text-align: center;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 10px;
}

.brand-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #2c3e50;
    border-radius: 2px;
}

.logo {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.welcome-text {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 폼 스타일 */
.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-group:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-group.focused {
    background: #f8f9fa;
    border-color: #667eea;
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: #6c757d;
    transition: color 0.3s ease;
}

.input-group.focused .input-icon {
    color: #667eea;
}

.input-icon i {
    font-size: 18px;
}

.form-control {
    border: none;
    background: transparent;
    padding: 15px 15px 15px 0;
    font-size: 16px;
    color: #333;
    flex: 1;
    outline: none;
    box-shadow: none;
}

.form-control::placeholder {
    color: #adb5bd;
    transition: color 0.3s ease;
}

.input-group.focused .form-control::placeholder {
    color: #6c757d;
}

.form-control:focus {
    outline: none;
    box-shadow: none;
}

/* 로그인 버튼 */
.login-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.btn-icon {
    transition: transform 0.3s ease;
}

.login-btn:hover .btn-icon {
    transform: translateX(3px);
}

/* 에러 메시지 */
.form-footer {
    margin-top: 20px;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #c53030;
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
}

.success-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    color: #22543d;
    font-size: 14px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.error-message i,
.success-message i {
    font-size: 16px;
}

/* 로그인 푸터 */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.login-footer p {
    color: #6c757d;
    font-size: 12px;
    margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .login-card {
        margin: 20px;
        padding: 30px 20px;
    }

    .welcome-text {
        font-size: 24px;
    }

    .form-control {
        font-size: 14px;
    }

    .login-btn {
        padding: 12px;
        font-size: 14px;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(30, 30, 30, 0.95);
        color: #fff;
    }

    .welcome-text {
        background: linear-gradient(135deg, #667eea, #764ba2);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .subtitle {
        color: #adb5bd;
    }

    .input-group {
        background: #2d3748;
    }

    .input-group:hover,
    .input-group.focused {
        background: #4a5568;
    }

    .form-control {
        color: #fff;
    }

    .form-control::placeholder {
        color: #718096;
    }

    .login-footer {
        border-top-color: #4a5568;
    }

    .login-footer p {
        color: #a0aec0;
    }
}
