/* assets/css/streamer.css */

:root {
    --primary-color: #ff6b00;
    --secondary-color: #1a1a1a;
    --accent-color: #ffcc00;
    --dark-bg: #0d1117;
    --darker-bg: #161b22;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --border-color: #30363d;
    --success-color: #238636;
    --danger-color: #da3633;
    --warning-color: #f85149;
    --info-color: #58a6ff;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header และ Navigation */
.navbar {
    background: rgba(22, 27, 34, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color) !important;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Sidebar Styles */
.sidebar {
    background: rgba(22, 27, 34, 0.8);
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - 76px);
    padding: 2rem 1rem;
}

.sidebar-content {
    position: sticky;
    top: 2rem;
}

/* Stat Cards */
.stat-card {
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.2);
    border-color: var(--primary-color);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.stat-card .stat-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--dark-bg);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-card .stat-icon.bg-success {
    background: linear-gradient(135deg, var(--success-color), #2ea043);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-card .stat-icon.bg-warning {
    background: linear-gradient(135deg, var(--warning-color), #ff8c42);
    color: var(--dark-bg);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-card .stat-icon.bg-info {
    background: linear-gradient(135deg, var(--info-color), #1f6feb);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* Live Indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(248, 81, 73, 0.2);
    border: 1px solid var(--warning-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--warning-color);
    margin-top: 0.5rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--warning-color);
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Action Buttons */
.action-buttons {
    margin-top: 2rem;
}

.action-buttons .btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Main Content */
.main-content {
    padding: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.page-header .lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Banner Carousel */
.main-banner {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.banner-slide {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 4rem 2rem;
    text-align: center;
    color: var(--dark-bg);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content h2 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.banner-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.banner-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Leaderboard */
.leaderboard-section {
    margin-bottom: 3rem;
}

.leaderboard-section h3 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    border-radius: 8px 8px 0 0;
    margin-right: 1rem;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--dark-bg);
    border: none;
}

.leaderboard {
    background: rgba(22, 27, 34, 0.9);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 107, 0, 0.1);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    font-size: 1.5rem;
    font-weight: bold;
    width: 60px;
    text-align: center;
}

.rank.gold { color: #ffd700; }
.rank.silver { color: #c0c0c0; }
.rank.bronze { color: #cd7f32; }

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: var(--dark-bg);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e5e5e5);
    color: var(--dark-bg);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #ff9500);
    color: white;
}

.rank-badge.rank-4,
.rank-badge.rank-5 {
    background: linear-gradient(135deg, var(--info-color), #1f6feb);
    color: white;
}

.streamer-info {
    flex: 1;
    margin-left: 1rem;
}

.streamer-name {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.streamer-game-id {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.viewer-stats {
    text-align: right;
}

.viewer-count {
    color: var(--accent-color);
    font-size: 1.3rem;
    font-weight: bold;
}

/* Right Sidebar */
.right-sidebar {
    padding: 2rem 1rem;
}

.reward-section,
.rules-section {
    margin-bottom: 2rem;
}

.reward-section h4,
.rules-section h4 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.reward-card {
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.reward-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(255, 107, 0, 0.2);
}

.reward-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: bold;
}

.reward-list {
    margin-bottom: 1rem;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.reward-item:last-child {
    border-bottom: none;
}

.reward-item .rank {
    font-size: 0.9rem;
    color: var(--text-secondary);
    width: auto;
}

.reward-item .prize {
    font-weight: bold;
    color: var(--accent-color);
}

.time-remaining {
    color: var(--warning-color);
    font-size: 0.9rem;
    text-align: center;
    padding: 0.75rem;
    background: rgba(248, 81, 73, 0.1);
    border-radius: 8px;
}

.rules-content ul {
    list-style: none;
    padding: 0;
}

.rules-content li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.rules-content li:before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.rules-content li:last-child {
    border-bottom: none;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #2ea043);
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #ff8c42);
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #1f6feb);
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

.btn-outline-warning {
    color: var(--accent-color);
    border-color: var(--accent-color);
    border-radius: 8px;
    font-weight: 600;
}

.btn-outline-warning:hover {
    background: var(--accent-color);
    color: var(--dark-bg);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-info {
    color: var(--info-color);
    border-color: var(--info-color);
    border-radius: 8px;
    font-weight: 600;
}

.btn-outline-info:hover {
    background: var(--info-color);
    color: white;
}

/* Card Styles */
.card {
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(255, 107, 0, 0.2);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--dark-bg);
    font-weight: bold;
    border-radius: 12px 12px 0 0 !important;
    border-bottom: none;
}

.card-body {
    color: var(--text-primary);
}

/* Form Styles */
.form-control {
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(13, 17, 23, 0.9);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* Table Styles */
.table-dark {
    background: rgba(22, 27, 34, 0.8);
    color: var(--text-primary);
}

.table-dark th {
    background: var(--primary-color);
    color: var(--dark-bg);
    font-weight: bold;
    border: none;
}

.table-dark td {
    border-color: var(--border-color);
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: rgba(35, 134, 54, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.alert-warning {
    background: rgba(248, 81, 73, 0.2);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.alert-info {
    background: rgba(88, 166, 255, 0.2);
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

.alert-danger {
    background: rgba(218, 54, 51, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

/* Badge Styles */
.badge {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

.bg-warning {
    background: var(--warning-color) !important;
    color: var(--dark-bg) !important;
}

.bg-info {
    background: var(--info-color) !important;
}

.bg-success {
    background: var(--success-color) !important;
}

/* Modal Styles */
.modal-content {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.modal-body {
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* Animation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        padding: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .banner-content h2 {
        font-size: 2rem;
    }
    
    .leaderboard-item {
        padding: 1rem;
    }
    
    .rank {
        width: 50px;
        font-size: 1.2rem;
    }
    
    .viewer-count {
        font-size: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .reward-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0 0.5rem;
    }
    
    .banner-slide {
        padding: 2rem 1rem;
        min-height: 200px;
    }
    
    .banner-content h2 {
        font-size: 1.5rem;
    }
    
    .banner-content h3 {
        font-size: 1.2rem;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .streamer-info {
        margin-left: 0;
        text-align: center;
    }
    
    .viewer-stats {
        text-align: center;
    }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Footer */
.footer {
    background: rgba(22, 27, 34, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer h5 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color);
}

.footer .social-icons a {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border {
    color: var(--primary-color);
}

/* Success States */
.success-glow {
    box-shadow: 0 0 20px rgba(35, 134, 54, 0.5);
}

.error-glow {
    box-shadow: 0 0 20px rgba(218, 54, 51, 0.5);
}
.step-icon {
    margin-bottom: 1rem;
}

.step-icon i {
    color: var(--primary-color) !important;
    margin-bottom: 1rem;
}

.step-icon h6,
.card-body h6 {
    color: var(--text-primary) !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-icon p,
.card-body p.text-muted {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* แก้ไขสีในส่วน step columns */
.col-md-4.text-center h6 {
    color: var(--text-primary) !important;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.col-md-4.text-center p.text-muted {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
}

/* เพิ่มความคมชัดให้ไอคอน */
.fa-paper-plane {
    color: var(--primary-color) !important;
}

.fa-search {
    color: var(--warning-color) !important;
}

.fa-check-circle {
    color: var(--success-color) !important;
}

/* แก้ไขสีข้อความทั้งหมดในส่วนนี้ */
.text-center .step-icon h6 {
    color: var(--text-primary) !important;
}

.text-center .step-icon p {
    color: var(--text-secondary) !important;
}

/* เพิ่มพื้นหลังเบาๆ ให้ข้อความชัดขึ้น */
.col-md-4.text-center {
    background: rgba(22, 27, 34, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.col-md-4.text-center:hover {
    background: rgba(22, 27, 34, 0.5);
    border-color: var(--primary-color);
}