﻿/* wwwroot/css/common.css */
:root {
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #f093fb;
    --success-color: #4ade80;
    --danger-color: #f87171;
    --warning-color: #fbbf24;
    --info-color: #60a5fa;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Enhanced Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: none !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .nav-link:hover, .nav-link.active {
        background: var(--primary-gradient);
        color: white !important;
        transform: translateY(-1px);
    }

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow-lg);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .dropdown-item:hover {
        background: var(--primary-gradient);
        color: white;
        transform: translateX(5px);
    }

/* Enhanced Container */
.container, .container-fluid {
    max-width: 1400px;
}

/* Enhanced Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: var(--box-shadow-lg);
    }

.card-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    border: none;
    padding: 1.25rem;
    font-weight: 600;
}

/* Enhanced Coin Card Styles */
.coin-card {
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s;
}

    .coin-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.15);
    }

/* News Item Styles */
.news-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

    .news-item:hover {
        background-color: #e9ecef;
        transform: translateX(5px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .news-item h6 {
        color: #495057;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .news-item small {
        color: #6c757d;
    }

/* Score Badge Styles */
.score-badge {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

/* Sentiment Analysis Colors */
.sentiment-positive {
    color: #198754;
    font-weight: 600;
}

.sentiment-neutral {
    color: #6c757d;
    font-weight: 500;
}

.sentiment-negative {
    color: #dc3545;
    font-weight: 600;
}

/* Enhanced Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    }

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #22c55e);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #ef4444);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #f59e0b);
}

/* Enhanced Form Controls */
.form-select, .form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

    .form-select:focus, .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        transform: translateY(-1px);
    }

/* Enhanced Badges */
.badge {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Signal Badge Styles - Enhanced */
.signal-strong-buy,
.signal-strong_buy {
    background: linear-gradient(135deg, #198754, #16a34a) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
    border: 1px solid #146c43;
    font-weight: 600;
}

.signal-buy {
    background: linear-gradient(135deg, #20c997, #0891b2) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(32, 201, 151, 0.3);
    border: 1px solid #0aa2c0;
    font-weight: 600;
}

.signal-weak-buy,
.signal-weak_buy {
    background: linear-gradient(135deg, #0dcaf0, #2563eb) !important;
    color: #000000 !important; /* 검은색으로 변경하여 가독성 개선 */
    box-shadow: 0 2px 8px rgba(13, 202, 240, 0.3);
    border: 1px solid #0aa2c0;
    font-weight: 600;
}

.signal-neutral {
    background: linear-gradient(135deg, #adb5bd, #4b5563) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(173, 181, 189, 0.3);
    border: 1px solid #565e64;
    font-weight: 600;
}

/* Enhanced Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    overflow: hidden;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.6s ease;
    color: #000000 !important; /* 진행률 바 내부 텍스트를 검은색으로 */
    font-weight: 600;
    text-shadow: none;
}

.progress-bar-tech {
    background: var(--primary-gradient) !important;
}

.progress-bar-news {
    background: linear-gradient(135deg, var(--info-color), #3b82f6) !important;
}

/* Enhanced Loading */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Enhanced Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    border: none;
}

/* Enhanced Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    font-weight: 500;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.alert-success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}

.alert-primary {
    background: linear-gradient(135deg, #e0f2fe, #b3e5fc);
    color: #0277bd;
}

.alert-secondary {
    background: linear-gradient(135deg, #f5f5f5, #eeeeee);
    color: #424242;
}

.alert-warning {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #f57c00;
}

/* ==============================================
   CoinAnalysis 페이지 스타일
   ============================================== */

/* 기술적 지표 색상 스타일 */
.positive-value {
    color: #198754 !important;
    font-weight: 600;
}

.negative-value {
    color: #dc3545 !important;
    font-weight: 600;
}

.neutral-value {
    color: #6c757d !important;
    font-weight: 500;
}

/* 인디케이터 설명 */
.indicator-description {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    color: #6c757d;
}

/* 분석 설명 박스 스타일 */
.analysis-explanation {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: all 0.3s ease;
}

    .analysis-explanation:hover {
        background-color: #f1f3f4;
        transform: translateX(2px);
    }

    .analysis-explanation h6 {
        color: #007bff;
        margin-bottom: 10px;
        font-weight: 600;
    }

    .analysis-explanation .highlight {
        background-color: #fff3cd;
        padding: 2px 6px;
        border-radius: 4px;
        font-weight: 500;
        color: #856404;
    }

    .analysis-explanation .positive {
        color: #198754;
        font-weight: 600;
    }

    .analysis-explanation .negative {
        color: #dc3545;
        font-weight: 600;
    }

    .analysis-explanation .neutral {
        color: #6c757d;
        font-weight: 500;
    }

/* Badge 텍스트 개선 */
.bg-success {
    color: #ffffff !important;
}

.bg-secondary {
    color: #ffffff !important;
}

.bg-danger {
    color: #ffffff !important;
}

/* 대비 개선을 위한 추가 스타일 */
.text-white-contrast {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.text-dark-contrast {
    color: #000000 !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

/* 분석 점수 카드 스타일 */
.score-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
}

    .score-card h5 {
        color: #495057;
        margin-bottom: 0.75rem;
        font-weight: 600;
    }

/* 코인 정보 테이블 스타일 */
.coin-info-table {
    margin-bottom: 0;
}

    .coin-info-table th {
        background-color: #f8f9fa;
        font-weight: 600;
        color: #495057;
        border-top: none;
        padding: 0.75rem;
    }

    .coin-info-table td {
        padding: 0.75rem;
        vertical-align: middle;
    }

/* 기술적 지표 그리드 스타일 */
.technical-indicators .row {
    margin-bottom: 0.5rem;
}

.technical-indicators p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.technical-indicators .col-6 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* 감성 분석 스타일 */
.sentiment-analysis .d-flex {
    margin-bottom: 0.5rem;
}

.sentiment-analysis span:first-child {
    font-weight: 500;
    color: #495057;
}

/* Lotto Ball Styles */
.lotto-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    margin: 0.25rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

    .lotto-ball:hover {
        transform: scale(1.1);
    }

.ball-yellow {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.ball-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.ball-red {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.ball-green {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.ball-gray {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

/* 급등주/급락주 탭 스타일 */
.custom-gainers-btn.active-gainers {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.custom-gainers-btn.inactive-gainers {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #90caf9;
}

.custom-losers-btn.active-losers {
    background: #d32f2f;
    color: #fff;
    border-color: #d32f2f;
}

.custom-losers-btn.inactive-losers {
    background: #ffebee;
    color: #d32f2f;
    border-color: #ef9a9a;
}

/* 추천 코인 목록 헤더 - 모바일 반응형 */
.recommendations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recommendation-prices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (min-width: 768px) {
    .recommendations-header {
        flex-direction: row;
    }

    .recommendation-prices {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .price-item {
        flex: 0 0 auto;
        justify-content: flex-start;
        min-width: 0;
    }

        .price-item:not(:last-child) {
            margin-right: 0.5rem;
        }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 1rem;
    }

    .coin-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    }

    /* CoinAnalysis 반응형 스타일 */
    .analysis-explanation {
        padding: 12px;
        font-size: 0.9rem;
    }

        .analysis-explanation h6 {
            font-size: 1rem;
        }

    .news-item {
        padding: 12px;
    }

    .technical-indicators .col-6 {
        margin-bottom: 0.5rem;
    }

    .score-card {
        padding: 0.75rem;
    }
}

@media (max-width: 767px) {
    .recommendations-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

        .recommendations-header h3 {
            margin-bottom: 0;
            font-size: 1.1rem;
        }

        .recommendations-header .text-muted {
            align-self: flex-start;
            width: 100%;
        }

            .recommendations-header .text-muted small {
                font-size: 0.8rem;
            }

    .recommendation-prices {
        flex-direction: column;
        gap: 0.4rem;
    }

    .price-item {
        justify-content: space-between;
        width: 100%;
        padding: 0.25rem 0;
        border-bottom: 1px solid #f0f0f0;
    }

        .price-item:last-child {
            border-bottom: none;
        }

        .price-item .badge {
            font-size: 0.7rem;
            padding: 0.2rem 0.4rem;
        }

        .price-item .fw-bold {
            font-size: 0.85rem;
        }
}

@media (max-width: 576px) {
    .recommendations-header {
        gap: 0.25rem;
    }

        .recommendations-header h3 {
            font-size: 1rem;
        }

        .recommendations-header .text-muted small {
            font-size: 0.75rem;
        }

    .recommendation-prices {
        gap: 0.3rem;
    }

    .price-item {
        padding: 0.2rem 0;
    }

        .price-item .badge {
            font-size: 0.65rem;
            padding: 0.15rem 0.3rem;
        }

        .price-item .fw-bold {
            font-size: 0.8rem;
        }

    .col-md-4 {
        margin-bottom: 1rem;
    }

    .coin-card:hover {
        transform: none;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    /* CoinAnalysis 모바일 스타일 */
    .analysis-explanation {
        border-left-width: 3px;
        padding: 10px;
    }

    .news-item h6 {
        font-size: 0.95rem;
    }

    .coin-info-table th,
    .coin-info-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* 모바일 터치 최적화 */
@media (hover: none) {
    .coin-card:hover {
        transform: none;
        box-shadow: var(--box-shadow);
    }

    .news-item:hover {
        background-color: #f8f9fa;
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f8fafc;
        --light-color: #1f2937;
    }

    body {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        color: var(--dark-color);
    }

    .card {
        background: rgba(31, 41, 55, 0.9);
        color: var(--dark-color);
    }

    .navbar {
        background: rgba(31, 41, 55, 0.95) !important;
    }

    .news-item {
        background-color: rgba(55, 65, 81, 0.8);
        border-color: rgba(75, 85, 99, 0.5);
        color: #f8fafc;
    }

        .news-item:hover {
            background-color: rgba(55, 65, 81, 1);
        }

        .news-item h6 {
            color: #f8fafc;
        }

    /* CoinAnalysis Dark mode */
    .analysis-explanation {
        background-color: rgba(55, 65, 81, 0.8);
        border-left-color: #60a5fa;
        color: #f8fafc;
    }

        .analysis-explanation:hover {
            background-color: rgba(55, 65, 81, 1);
        }

        .analysis-explanation h6 {
            color: #60a5fa;
        }

        .analysis-explanation .highlight {
            background-color: rgba(251, 191, 36, 0.2);
            color: #fbbf24;
        }

    .score-card {
        background: linear-gradient(135deg, rgba(55, 65, 81, 0.8) 0%, rgba(75, 85, 99, 0.8) 100%);
        border-color: rgba(75, 85, 99, 0.5);
        color: #f8fafc;
    }

        .score-card h5 {
            color: #f8fafc;
        }

    .coin-info-table th {
        background-color: rgba(55, 65, 81, 0.8);
        color: #f8fafc;
    }

    .coin-info-table td {
        color: #f8fafc;
    }
}

/* AI 분석 카드 스타일 */
.ai-analysis-text {
    line-height: 1.7;
    font-size: 1.02em;
    color: #2c3e50;
}

    .ai-analysis-text h6 {
        color: #6f42c1 !important;
        border-left: 3px solid #6f42c1;
        padding-left: 10px;
        margin-top: 1.5rem;
    }

    .ai-analysis-text p {
        text-align: justify;
        margin-bottom: 1rem;
    }

    .ai-analysis-text strong {
        color: #495057;
        font-weight: 600;
    }

    .ai-analysis-text em {
        color: #6c757d;
        font-style: italic;
    }

/* AI 분석 카드 헤더 그라디언트 */
.card-header.bg-gradient {
    border: none;
}

/* AI 토글 스위치 스타일 */
.form-check-input:checked {
    background-color: #6f42c1;
    border-color: #6f42c1;
}

/* AI 상태 배지 애니메이션 */
#aiAnalysisStatus {
    transition: all 0.3s ease;
}

/* AI 분석 로딩 애니메이션 */
#aiAnalysisLoading {
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
    }
}

/* AI 에러 상태 스타일 */
#aiAnalysisError {
    border-left: 4px solid #ffc107;
}

/* 재시도 버튼 호버 효과 */
#retryAiAnalysis:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}


