@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-gradient: radial-gradient(circle at top, #fdfbf7 0%, #f4eee1 100%);
    --primary-gold: #c5a059;
    --primary-gold-hover: #b38f4f;
    --gold-gradient: linear-gradient(135deg, #e5c07b 0%, #ab8b48 100%);
    --card-bg: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.8);
    --text-main: #332d22;
    --text-muted: #6e6450;
    --shadow-color: rgba(197, 160, 89, 0.08);
    --shadow-hover: rgba(171, 139, 72, 0.15);
    --accent-teal: #617d65;
    --accent-terracotta: #b5563f;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header Styling */
header {
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2.2rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

h1 span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 600px;
    margin: 0.5rem auto 0 auto;
}

/* Main Layout Grid */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px -5px var(--shadow-color);
    padding: 2rem;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gradient);
    opacity: 0.8;
}

.glass-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px -5px var(--shadow-hover);
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px dashed rgba(197, 160, 89, 0.3);
    padding-bottom: 0.8rem;
}

.panel-title i {
    color: var(--primary-gold);
}

/* 4D Number Display */
.number-display-container {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.number-digit-box {
    width: 60px;
    height: 70px;
    background: linear-gradient(135deg, #ffffff 0%, #f9f6ef 100%);
    border: 1px solid rgba(197, 160, 89, 0.4);
    box-shadow: 0 6px 12px var(--shadow-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: #4a3e26;
    position: relative;
}

.number-digit-box::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 60%;
    height: 3px;
    background: var(--gold-gradient);
    border-radius: 10px;
}

/* Prediction Cards Grid */
.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.prediction-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}

.prediction-card:hover {
    border-color: var(--primary-gold);
    transform: scale(1.02);
}

.prediction-badge {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.badge-ai {
    background: rgba(197, 160, 89, 0.15);
    color: #8c6a23;
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.badge-stats {
    background: rgba(97, 125, 101, 0.15);
    color: var(--accent-teal);
    border: 1px solid rgba(97, 125, 101, 0.3);
}

.pred-num-txt {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-main);
    margin: 0.5rem 0;
    background: linear-gradient(135deg, #5c5035 0%, #2e281a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.confidence-bar-bg {
    height: 6px;
    background: rgba(197, 160, 89, 0.15);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.8rem;
}

.confidence-bar-fill {
    height: 100%;
    background: var(--gold-gradient);
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Table Styling */
.table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: rgba(255, 255, 255, 0.5);
}

th {
    background: rgba(197, 160, 89, 0.1);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 1rem;
    font-size: 0.9rem;
    border-bottom: 2px solid rgba(197, 160, 89, 0.25);
}

td {
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(197, 160, 89, 0.15);
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(197, 160, 89, 0.04);
}

/* Utility Badges */
.badge-time {
    display: inline-block;
    background: #f1ebd9;
    color: #7d6537;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.draw-split-badges span {
    display: inline-block;
    background: #ffffff;
    border: 1px solid rgba(197, 160, 89, 0.25);
    border-radius: 6px;
    padding: 0.1rem 0.35rem;
    margin-right: 0.2rem;
    font-weight: 600;
    font-family: var(--font-heading);
}

/* Quick Statistics Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item-box {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(197, 160, 89, 0.15);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-item-box .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-item-box .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-gold-hover);
    font-family: var(--font-heading);
    margin-top: 0.25rem;
}

/* Charts Wrapper */
.chart-wrapper {
    height: 250px;
    position: relative;
    margin-top: 1rem;
}

/* Tabs for filter */
.tab-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(197, 160, 89, 0.08);
    padding: 0.35rem;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 1rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #ffffff;
    color: var(--primary-gold-hover);
    box-shadow: 0 4px 10px var(--shadow-color);
}

/* Forms styling */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

input, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    border-color: var(--primary-gold);
}

.btn-primary {
    background: var(--gold-gradient);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(171, 139, 72, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(171, 139, 72, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Footer Section */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px dashed rgba(197, 160, 89, 0.2);
    margin-top: 4rem;
}

footer a {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 500;
}

/* Responsive Customizations */
@media (max-width: 576px) {
    header {
        padding: 1.5rem 1rem 1rem 1rem;
    }
    h1 {
        font-size: 1.7rem;
    }
    .glass-panel {
        padding: 1.25rem;
    }
}

/* ==================== Phase 2: Paito & Backtesting Styles ==================== */

/* Header Navigation Bar styles */
header nav {
    margin-top: 1.5rem !important;
}

header nav a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease !important;
}

/* Paito Warna Digit Cells style */
.paito-digit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    border: 1px solid rgba(197, 160, 89, 0.2);
    cursor: pointer;
    background-color: transparent;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.paito-digit:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 8px var(--shadow-hover);
    border-color: var(--primary-gold);
}

/* Palette dot states */
.color-dot.active {
    box-shadow: 0 0 0 2px var(--primary-gold);
    transform: scale(1.1);
}

/* Table header customizations for Paito */
#paito-table th {
    text-align: center;
}

#paito-table td {
    text-align: center;
}

#paito-table td:first-child,
#paito-table td:nth-child(2) {
    text-align: left;
}

/* Paito Digit colors default badges override */
.paito-digit-colored {
    color: #ffffff !important;
}

/* ==================== Phase 3: Landing Page & Auth Styles ==================== */

/* Hero Text highlight animation style */
h2 span, h1 span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Auth Login & Create User Form helper styles */
.form-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* User management specific card items */
.badge-admin {
    background: rgba(181, 86, 63, 0.15);
    color: var(--accent-terracotta);
    border: 1px solid rgba(181, 86, 63, 0.3);
}

.badge-member {
    background: rgba(97, 125, 101, 0.15);
    color: var(--accent-teal);
    border: 1px solid rgba(97, 125, 101, 0.3);
}

