/* 알림 설정 페이지 전용 스타일 */

.notification-settings-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 100px 0 50px;
}

/* 페이지 헤더 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 0.8rem;
    color: #ccc;
}

.page-header h1 {
    margin: 0 0 10px;
    color: #333;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-header h1 i {
    color: #667eea;
}

.page-header p {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
}

/* 설정 그리드 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.settings-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s;
}

.settings-card:hover {
    transform: translateY(-2px);
}

.settings-card.full-width {
    grid-column: 1 / -1;
}

/* 카드 헤더 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-info i {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
}

.header-info h3 {
    margin: 0 0 5px;
    font-size: 1.3rem;
}

.header-info p {
    margin: 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* 토글 스위치 */
.toggle-switch {
    position: relative;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    display: block;
    width: 60px;
    height: 30px;
    background: rgba(255,255,255,0.3);
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.toggle-switch label:before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle-switch input:checked + label {
    background: rgba(255,255,255,0.5);
}

.toggle-switch input:checked + label:before {
    transform: translateX(30px);
}

/* 설정 콘텐츠 */
.email-settings-content,
.sms-settings-content {
    padding: 30px;
    display: none;
}

.email-settings-content.active,
.sms-settings-content.active {
    display: block;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-of-type {
    border-bottom: none;
}

.setting-info h4 {
    margin: 0 0 5px;
    color: #333;
    font-size: 1rem;
}

.setting-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.setting-toggle {
    position: relative;
}

.setting-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.setting-toggle label {
    display: block;
    width: 50px;
    height: 24px;
    background: #ddd;
    border-radius: 24px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.setting-toggle label:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.setting-toggle input:checked + label {
    background: #667eea;
}

.setting-toggle input:checked + label:before {
    transform: translateX(26px);
}

/* 휴대폰 인증 */
.phone-verification {
    margin-bottom: 25px;
}

.phone-input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.phone-input {
    display: flex;
    gap: 10px;
}

.phone-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.phone-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.verify-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.verify-btn:hover {
    background: #218838;
}

.verify-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.verification-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #dc3545;
}

.verification-status.verified {
    color: #28a745;
}

.verification-status.verified i:before {
    content: '\f058';
}

/* SMS 옵션 */
.sms-options {
    border-top: 1px solid #f0f0f0;
    padding-top: 25px;
    margin-top: 25px;
}

/* 테스트 알림 */
.test-notification {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
    margin-top: 25px;
}

.test-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.test-btn:hover {
    background: #138496;
}

/* 알림 히스토리 */
.notification-history {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0 30px 30px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.history-item:last-child {
    border-bottom: none;
}

.history-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.history-icon.email {
    background: #667eea;
}

.history-icon.sms {
    background: #28a745;
}

.history-icon.failed {
    background: #dc3545;
}

.history-content {
    flex: 1;
}

.history-content h5 {
    margin: 0 0 5px;
    color: #333;
    font-size: 0.95rem;
}

.history-content p {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

.history-time {
    font-size: 0.8rem;
    color: #999;
}

.history-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.history-status.success {
    background: #d4edda;
    color: #155724;
}

.history-status.failed {
    background: #f8d7da;
    color: #721c24;
}

/* 설정 저장 */
.save-settings {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.save-btn,
.reset-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.save-btn {
    background: #28a745;
    color: white;
}

.save-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.reset-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.reset-btn:hover {
    background: #e9ecef;
}

.clear-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.clear-btn:hover {
    background: #c82333;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    animation: slideInDown 0.3s ease;
}

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

@keyframes slideInDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #666;
}

.modal-body {
    padding: 25px;
}

/* 인증 단계 */
.verification-step {
    text-align: center;
}

.phone-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
}

.phone-display i {
    color: #667eea;
}

.verification-input {
    position: relative;
    margin: 20px 0;
}

.verification-input input {
    width: 100%;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 0.1em;
}

.verification-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.timer {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #dc3545;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.verification-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
}

.primary-btn,
.secondary-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn {
    background: #667eea;
    color: white;
}

.primary-btn:hover {
    background: #5a67d8;
}

.secondary-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.secondary-btn:hover {
    background: #e9ecef;
}

/* 로딩 상태 */
.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #667eea;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .notification-settings-page {
        padding: 80px 0 30px;
    }
    
    .page-header {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-info {
        align-items: flex-start;
    }
    
    .phone-input {
        flex-direction: column;
    }
    
    .verify-btn {
        align-self: flex-start;
    }
    
    .save-settings {
        flex-direction: column;
        align-items: center;
    }
    
    .save-btn,
    .reset-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

@media (max-width: 480px) {
    .settings-card {
        margin: 0 -10px;
        border-radius: 10px;
    }
    
    .card-header,
    .email-settings-content,
    .sms-settings-content,
    .notification-history {
        padding: 20px;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .setting-toggle {
        align-self: flex-end;
    }
}