/* Custom Styles for Poker HUD Analyzer */

/* ===== DARK MODE STYLES ===== */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --input-bg: #334155;
    --input-border: #475569;
}

.dark {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.dark body {
    background-color: var(--bg-primary);
}

.dark .bg-gray-50 {
    background-color: var(--bg-primary);
}

.dark .bg-white {
    background-color: var(--bg-card);
}

.dark .text-gray-800 {
    color: #f1f5f9 !important;
}

.dark .text-gray-700 {
    color: #e2e8f0 !important;
}

.dark .text-gray-600 {
    color: #cbd5e1 !important;
}

.dark .text-gray-500 {
    color: #94a3b8 !important;
}

.dark .border-gray-200 {
    border-color: var(--border-color);
}

.dark .bg-gray-50,
.dark .bg-gray-100 {
    background-color: #1e293b;
}

.dark input,
.dark textarea {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #64748b;
}

.dark input:focus,
.dark textarea:focus {
    border-color: #3b82f6;
    background-color: #334155;
}

.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

/* Dark mode for specific components */
.dark .hud-input-card,
.dark .result-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

.dark .strategy-section {
    background: #0f172a;
    border-left-color: #3b82f6;
}

.dark .strategy-section p,
.dark .strategy-section li {
    color: #cbd5e1 !important;
}

.dark .stat-row {
    border-bottom-color: var(--border-color);
}

/* Additional dark mode text colors */
.dark .stat-label {
    color: #94a3b8 !important;
}

.dark .stat-value {
    color: #f1f5f9 !important;
}

.dark label {
    color: #e2e8f0 !important;
}

.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
    color: #f1f5f9 !important;
}

.dark p {
    color: #cbd5e1;
}

.dark span {
    color: inherit;
}

/* Dark mode for result card */
.dark .bg-blue-50 {
    background-color: #1e3a5f !important;
}

.dark .bg-green-50 {
    background-color: #14532d !important;
}

.dark .bg-yellow-50 {
    background-color: #713f12 !important;
}

.dark .bg-red-50 {
    background-color: #7f1d1d !important;
}

.dark .bg-purple-50 {
    background-color: #581c87 !important;
}

.dark .bg-orange-50 {
    background-color: #7c2d12 !important;
}

.dark .bg-cyan-50 {
    background-color: #164e63 !important;
}

.dark .bg-indigo-50 {
    background-color: #312e81 !important;
}

.dark .bg-pink-50 {
    background-color: #831843 !important;
}

.dark .text-blue-800 {
    color: #93c5fd !important;
}

.dark .text-blue-700 {
    color: #bfdbfe !important;
}

.dark .text-blue-600 {
    color: #60a5fa !important;
}

.dark .text-green-700 {
    color: #86efac !important;
}

.dark .text-green-600 {
    color: #4ade80 !important;
}

.dark .text-yellow-600 {
    color: #fde047 !important;
}

.dark .text-yellow-700 {
    color: #fef08a !important;
}

.dark .text-orange-600 {
    color: #fb923c !important;
}

.dark .text-purple-600 {
    color: #c084fc !important;
}

.dark .text-purple-700 {
    color: #d8b4fe !important;
}

.dark .text-cyan-600 {
    color: #22d3ee !important;
}

.dark .text-cyan-700 {
    color: #67e8f9 !important;
}

.dark .border-blue-500 {
    border-color: #3b82f6 !important;
}

.dark .border-blue-200,
.dark .border-blue-300 {
    border-color: #1e40af !important;
}

.dark .border-green-200,
.dark .border-green-300 {
    border-color: #15803d !important;
}

.dark .border-green-500 {
    border-color: #22c55e !important;
}

.dark .border-yellow-500 {
    border-color: #eab308 !important;
}

.dark .border-red-200,
.dark .border-red-300 {
    border-color: #b91c1c !important;
}

/* Dark mode for error messages */
.dark .bg-red-50 {
    background-color: #7f1d1d !important;
}

.dark .text-red-800 {
    color: #fca5a5 !important;
}

.dark .text-red-700 {
    color: #fecaca !important;
}

.dark .text-red-600 {
    color: #f87171 !important;
}

.dark .border-red-500 {
    border-color: #ef4444 !important;
}

.dark .text-red-500 {
    color: #ef4444 !important;
}

.dark .border-purple-500 {
    border-color: #a855f7 !important;
}

.dark .border-orange-500 {
    border-color: #f97316 !important;
}

/* Dark mode for badges and labels */
.dark .bg-blue-100 {
    background-color: #1e40af !important;
}

.dark .text-blue-700 {
    color: #dbeafe !important;
}

.dark .bg-green-100 {
    background-color: #15803d !important;
}

.dark .bg-yellow-100 {
    background-color: #854d0e !important;
}

.dark .bg-red-100 {
    background-color: #991b1b !important;
}

.dark .bg-purple-100 {
    background-color: #6b21a8 !important;
}

.dark .bg-orange-100 {
    background-color: #9a3412 !important;
}

.dark .bg-cyan-100 {
    background-color: #155e75 !important;
}

/* Dark mode for footer */
.dark footer {
    background-color: #0f172a;
    border-top: 1px solid #334155;
}

.dark footer .text-gray-400 {
    color: #94a3b8 !important;
}

.dark footer .border-gray-700 {
    border-color: #334155 !important;
}

/* Light mode header styling */
header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* Ensure header text is always white/light in both modes */
header,
header h1,
header h2,
header a,
header span {
    color: white !important;
}

header a:hover {
    color: #93c5fd !important;
}

.dark header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Light mode: Ensure dark text on light backgrounds */
body:not(.dark) .text-gray-700 {
    color: #374151 !important;
}

body:not(.dark) .text-gray-800 {
    color: #1f2937 !important;
}

body:not(.dark) .text-gray-600 {
    color: #4b5563 !important;
}

body:not(.dark) .text-gray-500 {
    color: #6b7280 !important;
}

body:not(.dark) .bg-white {
    background-color: #ffffff !important;
}

body:not(.dark) .bg-gray-50 {
    background-color: #f9fafb !important;
}

/* Theme toggle button enhancement */
#themeToggle {
    transition: all 0.3s ease;
}

#themeToggle:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.1) !important;
}

#themeToggle i {
    transition: all 0.3s ease;
}

#themeToggle:hover i {
    transform: rotate(20deg);
}

/* Mobile theme toggle */
#themeToggleMobile {
    transition: all 0.3s ease;
}

#themeToggleMobile:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Custom Styles for Poker HUD Analyzer */

/* Ad Container Styles (승인 전: 투명) */
.ad-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ad-container.active {
    opacity: 1;
    pointer-events: auto;
}

.ad-container-top {
    width: 728px;
    height: 90px;
    margin: 20px auto;
}

.ad-container-left {
    width: 160px;
    height: 600px;
}

.ad-container-right {
    width: 300px;
    height: 250px;
}

.ad-container-bottom {
    width: 970px;
    height: 250px;
    margin: 40px auto 20px;
}

.ad-container-infeed {
    width: 100%;
    max-width: 300px;
    height: 250px;
    margin: 32px auto;
}

.ad-zone {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* Responsive Ad Adjustments */
@media (max-width: 1600px) {
    .ad-container-left {
        display: none;
    }
}

@media (max-width: 1280px) {
    .ad-container-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .ad-container-top {
        width: 320px;
        height: 50px;
    }
    
    .ad-container-bottom {
        display: none;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Classification Badge Styles */
.class-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.class-low {
    background-color: #dbeafe;
    color: #1e40af;
}

.class-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.class-high {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Dark mode for class badges */
.dark .class-low {
    background-color: #1e3a8a;
    color: #bfdbfe !important;
}

.dark .class-medium {
    background-color: #854d0e;
    color: #fef3c7 !important;
}

.dark .class-high {
    background-color: #7f1d1d;
    color: #fecaca !important;
}

/* Dark mode for gradient boxes */
.dark .bg-gradient-to-r,
.dark .bg-gradient-to-br {
    color: #f1f5f9 !important;
}

.dark .bg-gradient-to-r.from-blue-50,
.dark .bg-gradient-to-br.from-blue-50 {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%) !important;
}

.dark .bg-gradient-to-r.from-green-50,
.dark .bg-gradient-to-br.from-green-50 {
    background: linear-gradient(135deg, #14532d 0%, #15803d 100%) !important;
}

.dark .bg-gradient-to-r.from-red-50,
.dark .bg-gradient-to-br.from-red-50 {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%) !important;
}

.dark .bg-gradient-to-r.from-yellow-50,
.dark .bg-gradient-to-br.from-yellow-50 {
    background: linear-gradient(135deg, #713f12 0%, #854d0e 100%) !important;
}

.dark .bg-gradient-to-r.from-purple-50,
.dark .bg-gradient-to-br.from-purple-50 {
    background: linear-gradient(135deg, #581c87 0%, #6b21a8 100%) !important;
}

/* Ensure text inside colored boxes is visible */
.dark .bg-blue-50 *:not(.bg-white *),
.dark .bg-green-50 *:not(.bg-white *),
.dark .bg-yellow-50 *:not(.bg-white *),
.dark .bg-red-50 *:not(.bg-white *),
.dark .bg-purple-50 *:not(.bg-white *),
.dark .bg-orange-50 *:not(.bg-white *),
.dark .bg-cyan-50 *:not(.bg-white *) {
    color: #f1f5f9 !important;
}

/* White background boxes inside colored boxes */
.dark .bg-white {
    background-color: #1e293b !important;
}

.dark .bg-white * {
    color: #cbd5e1 !important;
}

/* Force specific colors for important elements */
.dark strong {
    color: #f1f5f9 !important;
}

.dark .font-semibold,
.dark .font-bold {
    color: inherit !important;
}

/* Table styling */
.dark table {
    background-color: #1e293b !important;
}

.dark thead {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
}

.dark tbody tr {
    border-color: #334155 !important;
}

.dark tbody tr:hover {
    background-color: #334155 !important;
}

.dark td,
.dark th {
    color: #f1f5f9 !important;
}

/* Links */
.dark a:not([class*="bg-"]) {
    color: #60a5fa !important;
}

.dark a:not([class*="bg-"]):hover {
    color: #93c5fd !important;
}
}

/* Player Type Badge */
.player-type-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Stat Row */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.stat-value {
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
}

/* Strategy Section */
.strategy-section {
    margin-top: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.strategy-section h3 {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 12px;
    font-weight: 600;
}

.strategy-section p, .strategy-section ul {
    font-size: 14px;
    line-height: 1.8;
    color: #4b5563;
}

.strategy-section ul {
    list-style: none;
    padding-left: 0;
}

.strategy-section li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.strategy-section li:last-child {
    border-bottom: none;
}

.strategy-section li:before {
    content: "▸";
    color: #3b82f6;
    font-weight: bold;
    margin-right: 8px;
}

/* Input Focus Effects */
input[type="number"]:focus {
    outline: none;
}

/* Fullscreen Ad Overlay Styles */
.fullscreen-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.fullscreen-ad-container {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ad-video-wrapper {
    width: 640px;
    height: 480px;
}

.ad-skip-button {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 12px 24px;
    background: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 10001;
}

.ad-skip-button:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.ad-countdown-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
