/**
 * HiLo Calculator - Modern Professional Styling
 * Matches Dyutam Neo-Brutal Theme
 */

.hilo-calculator-page {
    padding: var(--space-2xl) 0;
}

/* Header */
.calculator-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 3px solid var(--accent-electric);
}

.calculator-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #00ff88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.calculator-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Layout */
.calculator-layout-single {
    max-width: 1200px;
    margin: 0 auto;
}

.calculator-info-bottom {
    margin-top: var(--space-3xl);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 968px) {
    .info-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Main Calculator Area */
.calculator-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

/* Result Section */
.result-section {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 3px solid var(--accent-electric);
    border-radius: 16px;
    padding: var(--space-2xl);
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.2);
    position: relative;
    overflow: hidden;
}

.result-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-electric) 50%, transparent 100%);
}

.total-multiplier-display {
    margin-top: var(--space-md);
}

.multiplier-value {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--accent-electric);
    font-family: var(--font-heading);
    line-height: 1;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.result-section .multiplier-label {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: var(--space-md);
}

/* Sequence Section */
.sequence-section {
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: var(--space-2xl);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.btn-add-card {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: var(--bg-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.25);
}

.btn-add-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.35);
}

/* Card Sequence List */
.card-sequence-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.card-sequence-item {
    background: var(--bg-elevated);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: var(--space-xl);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

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

.card-sequence-item:hover {
    border-color: var(--accent-electric);
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.1);
}

.card-sequence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.card-number {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-electric);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-remove-card {
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #e11d48;
    border-radius: 6px;
    color: #e11d48;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-remove-card:hover {
    background: #e11d48;
    color: #fff;
}

/* Card Sequence Inputs */
.card-sequence-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (max-width: 640px) {
    .card-sequence-inputs {
        grid-template-columns: 1fr;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.input-group label {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-value-select,
.card-prediction-select {
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-value-select:hover,
.card-prediction-select:hover {
    border-color: var(--accent-electric);
}

.card-value-select:focus,
.card-prediction-select:focus {
    outline: none;
    border-color: var(--accent-electric);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

/* Card Multiplier Display */
.card-multiplier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-surface);
    border: 2px solid var(--accent-electric);
    border-radius: 8px;
    margin-top: var(--space-md);
}

.card-multiplier .multiplier-label {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.card-multiplier .multiplier-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-electric);
}

/* Sequence Actions */
.sequence-actions {
    display: flex;
    gap: var(--space-md);
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    border-color: var(--accent-electric);
    color: var(--accent-electric);
}

/* Current Card Section */
.current-card-section {
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: var(--space-2xl);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: var(--accent-electric);
    border-radius: 2px;
}

.current-card-display {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}

/* Playing Card */
.playing-card {
    width: 180px;
    height: 260px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 4px #000;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.3;
}

.playing-card.card-visible {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 15px 60px rgba(0, 255, 136, 0.3), 0 0 0 4px var(--accent-electric);
}

.card-value {
    font-size: 5rem;
    font-weight: 900;
    font-family: var(--font-heading);
    color: #000;
    line-height: 1;
}

.card-suit {
    font-size: 3rem;
    margin-top: var(--space-md);
}

/* Card Selector */
.card-selector {
    flex: 1;
    min-width: 280px;
}

.card-selector-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    margin-bottom: var(--space-md);
    letter-spacing: 0.05em;
}

.card-select {
    width: 100%;
    padding: var(--space-lg);
    background: var(--bg-elevated);
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-select:hover {
    border-color: var(--accent-electric);
}

.card-select:focus {
    outline: none;
    border-color: var(--accent-electric);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

/* Prediction Section */
.prediction-section {
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: var(--space-2xl);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.prediction-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

@media (max-width: 768px) {
    .prediction-buttons {
        grid-template-columns: 1fr;
    }
}

.prediction-btn {
    background: var(--bg-elevated);
    border: 3px solid #2a2a2a;
    border-radius: 12px;
    padding: var(--space-xl);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    position: relative;
    overflow: hidden;
}

.prediction-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-electric) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prediction-btn:not(:disabled):hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.prediction-btn:not(:disabled):hover::before {
    opacity: 1;
}

.prediction-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prediction-btn.prediction-lower {
    border-color: #e11d48;
}

.prediction-btn.prediction-lower:not(:disabled):hover {
    border-color: #ff1744;
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.1) 0%, var(--bg-elevated) 100%);
}

.prediction-btn.prediction-skip {
    border-color: #fbbf24;
}

.prediction-btn.prediction-skip:not(:disabled):hover {
    border-color: #ffaa00;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, var(--bg-elevated) 100%);
}

.prediction-btn.prediction-higher {
    border-color: var(--accent-electric);
}

.prediction-btn.prediction-higher:not(:disabled):hover {
    border-color: #00ffaa;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, var(--bg-elevated) 100%);
}

.prediction-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
}

.prediction-lower .prediction-icon {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: #fff;
}

.prediction-skip .prediction-icon {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
}

.prediction-higher .prediction-icon {
    background: linear-gradient(135deg, #00ff88 0%, #10b981 100%);
    color: #000;
}

.prediction-label {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

.prediction-stats {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary);
}

/* Recommendation Banner */
.recommendation-banner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: 8px;
    border: 2px solid;
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recommendation-banner.recommendation-lower {
    background: rgba(225, 29, 72, 0.1);
    border-color: #e11d48;
    color: #ff4466;
}

.recommendation-banner.recommendation-higher {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--accent-electric);
    color: var(--accent-electric);
}

.recommendation-banner.recommendation-skip {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
    color: #ffaa00;
}

.recommendation-banner.recommendation-neutral {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
    color: var(--text-secondary);
}

.recommendation-icon {
    font-size: 1.5rem;
}

.recommendation-text {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    flex: 1;
}

/* Game Progress Section */
.game-progress-section {
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: var(--space-2xl);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

@media (max-width: 768px) {
    .progress-stats {
        grid-template-columns: 1fr;
    }
}

.progress-stat {
    background: var(--bg-elevated);
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    padding: var(--space-lg);
    text-align: center;
}

.progress-stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    letter-spacing: 0.05em;
}

.progress-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.progress-stat-value.multiplier {
    color: var(--accent-electric);
}

/* Card History */
.card-history {
    background: var(--bg-elevated);
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    padding: var(--space-lg);
    min-height: 100px;
    margin-bottom: var(--space-lg);
}

.history-empty {
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    padding: var(--space-xl);
}

.history-cards {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.history-card-item {
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    min-width: 80px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.history-card-number {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.history-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.history-card-choice {
    font-size: 1.25rem;
    font-weight: 700;
}

.history-card-choice.choice-lower {
    color: #e11d48;
}

.history-card-choice.choice-higher {
    color: var(--accent-electric);
}

.history-card-mult {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Reset Button */
.btn-reset-game {
    width: 100%;
    padding: var(--space-lg);
    background: var(--bg-elevated);
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all 0.2s ease;
}

.btn-reset-game:hover {
    background: var(--bg-surface);
    border-color: var(--accent-electric);
    color: var(--accent-electric);
}

/* Sidebar */
.calculator-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    position: sticky;
    top: 100px;
}

@media (max-width: 1200px) {
    .calculator-sidebar {
        position: static;
    }
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Deck Visualization */
.deck-visual-section {
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: var(--space-xl);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.deck-visualization {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.deck-card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
    border: 2px solid var(--accent-electric);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
    position: relative;
}

.deck-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    background: var(--accent-electric);
    opacity: 0.2;
    z-index: -1;
}

.deck-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.deck-card.deck-card-used {
    background: var(--bg-elevated);
    border-color: #444;
    opacity: 0.4;
}

.deck-card.deck-card-used::before {
    background: #444;
    opacity: 0.1;
}

.deck-card-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.deck-card.deck-card-used .deck-card-value {
    color: var(--text-muted);
}

.deck-card-count {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.deck-card.deck-card-used .deck-card-count {
    color: var(--text-muted);
}

/* Deck Legend */
.deck-legend {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid;
}

.legend-color.available {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--accent-electric);
}

.legend-color.used {
    background: var(--bg-elevated);
    border-color: #444;
}

/* Info Cards */
.info-card {
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: var(--space-xl);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.info-card.info-card-tip {
    border-color: #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, var(--bg-surface) 100%);
}

.info-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    position: relative;
}

.info-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-electric);
    font-weight: 700;
}

.info-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Pattern Input Container */
.pattern-input-container {
    margin-bottom: var(--space-2xl);
}

.pattern-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    letter-spacing: 0.02em;
}

.pattern-input {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-elevated);
    border: 3px solid #2a2a2a;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    text-align: center;
}

.pattern-input:focus {
    outline: none;
    border-color: var(--accent-electric);
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.1);
    background: var(--bg-surface);
}

.pattern-input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.pattern-help {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
    text-align: center;
}

/* Card Flow Display */
.card-sequence-display {
    margin-bottom: var(--space-xl);
}

.card-flow {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
    padding: var(--space-xl);
    background: var(--bg-elevated);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    min-height: 120px;
}

.card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 3px solid var(--accent-electric);
    border-radius: 12px;
    min-width: 80px;
    position: relative;
    animation: cardPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.2);
}

@keyframes cardPop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.card-item.card-invalid {
    border-color: #e11d48;
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.1) 0%, var(--bg-elevated) 100%);
    opacity: 0.6;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.2);
}

.card-item.card-last {
    border-color: #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, var(--bg-elevated) 100%);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}

.card-face {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1;
}

.card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.card-direction {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.card-direction.low {
    background: rgba(225, 29, 72, 0.2);
    color: #ff4466;
}

.card-direction.high {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-electric);
}

.card-direction.wild {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.card-mult {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--accent-electric);
}

.card-result {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
}

.card-arrow {
    font-size: 1.5rem;
    color: var(--accent-electric);
    font-weight: 700;
    animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(4px);
    }
}

.card-arrow.arrow-invalid {
    color: #e11d48;
    opacity: 0.4;
}

/* Result Info Messages */
.result-info {
    margin-top: var(--space-lg);
}

.result-warning,
.result-success {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: 8px;
    animation: slideInUp 0.3s ease-out;
}

.result-warning {
    background: rgba(225, 29, 72, 0.1);
    border: 2px solid #e11d48;
    color: #ff4466;
}

.result-success {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid var(--accent-electric);
    color: var(--accent-electric);
}

.result-warning svg,
.result-success svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.result-warning strong,
.result-success strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.result-warning div div,
.result-success div div {
    font-size: 0.8125rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* Card Selection Dropdown (legacy support) */
.card-selection-select {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-selection-select:hover {
    border-color: var(--accent-electric);
}

.card-selection-select:focus {
    outline: none;
    border-color: var(--accent-electric);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .calculator-header {
        padding-bottom: var(--space-xl);
        margin-bottom: var(--space-2xl);
    }

    .current-card-section,
    .prediction-section,
    .game-progress-section,
    .deck-visual-section,
    .info-card {
        padding: var(--space-lg);
    }

    .playing-card {
        width: 140px;
        height: 200px;
    }

    .card-value {
        font-size: 3.5rem;
    }

    .card-suit {
        font-size: 2rem;
    }

    .deck-visualization {
        grid-template-columns: repeat(7, 1fr);
    }

    .pattern-input {
        font-size: 1.25rem;
        padding: var(--space-md) var(--space-lg);
    }

    .card-flow {
        gap: var(--space-sm);
        padding: var(--space-lg);
    }

    .card-item {
        min-width: 60px;
        padding: var(--space-md);
    }

    .card-face {
        font-size: 1.75rem;
    }

    .card-arrow {
        font-size: 1.25rem;
    }
}

/* Card Selections List (Dropdown-based) */
.card-selections-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.card-selection-item {
    background: var(--bg-elevated);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: var(--space-lg);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.card-selection-item:hover {
    border-color: var(--accent-electric);
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.1);
}

.card-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.card-selection-number {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-electric);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-selection-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-md);
    align-items: center;
}

.card-select-dropdown {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-select-dropdown:hover {
    border-color: var(--accent-electric);
}

.card-select-dropdown:focus {
    outline: none;
    border-color: var(--accent-electric);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.card-multiplier-display {
    min-width: 100px;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-muted);
    text-align: center;
    transition: all 0.3s ease;
}

.card-multiplier-display.has-value {
    color: var(--accent-electric);
    border-color: var(--accent-electric);
    background: rgba(0, 255, 136, 0.05);
}

@media (max-width: 640px) {
    .card-selection-input {
        grid-template-columns: 1fr;
    }

    .card-multiplier-display {
        min-width: auto;
    }
}

/* Pattern Input Section */
.pattern-input-section {
    background: var(--bg-surface);
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: var(--space-2xl);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    margin-bottom: var(--space-2xl);
}

.pattern-input-wrapper {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.pattern-input-field {
    flex: 1;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-elevated);
    border: 3px solid #2a2a2a;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.pattern-input-field:focus {
    outline: none;
    border-color: var(--accent-electric);
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.1);
    background: var(--bg-surface);
}

.pattern-input-field::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    text-transform: none;
}

.btn-calculate-pattern {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-2xl);
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: var(--bg-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.25);
    white-space: nowrap;
}

.btn-calculate-pattern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.35);
}

.pattern-help {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: var(--space-md);
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 2px solid #2a2a2a;
}

.pattern-result {
    margin-top: var(--space-lg);
}

.pattern-error {
    padding: var(--space-lg);
    background: rgba(225, 29, 72, 0.1);
    border: 2px solid #e11d48;
    border-radius: 8px;
    color: #ff4466;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    animation: slideInUp 0.3s ease-out;
}

.pattern-success {
    padding: var(--space-lg);
    background: rgba(0, 255, 136, 0.05);
    border: 2px solid var(--accent-electric);
    border-radius: 8px;
    animation: slideInUp 0.3s ease-out;
}

.pattern-success-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--accent-electric);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
}

.pattern-breakdown {
    background: var(--bg-elevated);
    border-radius: 8px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.pattern-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-surface);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
}

.pattern-multiplier {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-electric);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

@media (max-width: 640px) {
    .pattern-input-wrapper {
        flex-direction: column;
    }

    .btn-calculate-pattern {
        width: 100%;
        justify-content: center;
    }

    .pattern-input-field {
        font-size: 1rem;
    }
}
