/* Smart Bidder - VIP Luxury Stylesheet */
/* Dark elegant theme with gold/bronze/silver accents */

/* ========== GLOBAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --bg-primary: #0f0f1e;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --accent-gold: #d4af37;
    --accent-bronze: #cd7f32;
    --accent-silver: #c0c0c0;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #d4af37 0%, #cd7f32 100%);
    --gradient-dark: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ========== HEADER ========== */
.game-header {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent-gold);
    position: sticky;
    top: 0;
    z-index: 100;
}

.game-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.game-title h1 {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-title .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.header-stats {
    display: flex;
    gap: 30px;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-gold);
}

/* ========== MODE SELECTION SCREEN ========== */
#mode-selection {
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px;
}

#mode-selection h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent-gold);
}

.mode-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.mode-btn {
    background: var(--bg-card);
    border: 2px solid var(--accent-silver);
    padding: 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-btn:hover {
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.mode-btn.selected {
    border-color: var(--accent-gold);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.mode-btn h3 {
    color: var(--accent-gold);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.mode-btn p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.mode-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.mode-stats span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#mode-info {
    text-align: center;
    padding: 30px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid var(--accent-gold);
    border-radius: 15px;
    margin-bottom: 30px;
}

#mode-info h3 {
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.start-game-container {
    text-align: center;
}

#start-game-btn {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border: none;
    padding: 20px 60px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#start-game-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.5);
}

#start-game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Back To Home Button */
.back-home-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.back-home-btn {
    display: inline-block;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--text-secondary);
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.back-home-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

/* ========== GAME SCREEN ========== */
#game-screen {
    display: none;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.game-container {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 30px;
    min-height: calc(100vh - 140px);
}

/* Sidebar - Upcoming Items */
.sidebar-left {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 20px;
    height: fit-content;
}

.sidebar-left h3 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    text-align: center;
}

#upcoming-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upcoming-item {
    position: relative;
}

.mystery-preview {
    background: rgba(212, 175, 55, 0.1);
    border: 2px dashed;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    font-size: 2rem;
    color: var(--text-secondary);
    backdrop-filter: blur(5px);
}

.upcoming-category {
    font-size: 0.75rem;
    margin-top: 10px;
    color: var(--text-secondary);
}

/* Center - Main Auction Area */
.main-auction {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#auction-timer {
    text-align: center;
    font-size: 4rem;
    font-weight: bold;
    color: var(--accent-gold);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    padding: 20px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
}

#auction-timer.urgent {
    color: var(--warning);
    animation: pulse 1s infinite;
}

#auction-timer.critical {
    color: var(--error);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#current-item-card {
    flex: 1;
}

.item-card {
    background: var(--bg-card);
    border: 3px solid;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px;
    transition: all 0.5s ease;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

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

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.item-category {
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.item-rarity {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
}

.item-image-container {
    margin: 20px 0;
}

.item-image-placeholder {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.mystery-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mystery-icon {
    font-size: 5rem;
    color: var(--accent-gold);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.8);
}

.item-name {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--accent-gold);
}

.item-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.item-hint {
    font-style: italic;
    color: var(--accent-silver);
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(192, 192, 192, 0.05);
    border-left: 3px solid var(--accent-silver);
}

.item-value-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Bid Panel */
#bid-panel {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 25px;
}

.current-bid {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 10px;
}

.current-bid h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

#highest-bid-amount {
    font-size: 2rem;
    color: var(--accent-gold);
    font-weight: bold;
}

#highest-bidder {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.bid-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quick-bids {
    display: flex;
    gap: 10px;
}

.quick-bid-btn {
    flex: 1;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.quick-bid-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.bid-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#bid-input {
    background: var(--bg-primary);
    border: 2px solid var(--accent-gold);
    color: var(--text-primary);
    padding: 15px;
    border-radius: 8px;
    font-size: 1.2rem;
    text-align: center;
}

#bid-input:focus {
    outline: none;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.bid-validation {
    font-size: 0.85rem;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
}

.bid-validation.error {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.bid-validation.warning {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.bid-validation.success {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.bid-actions {
    display: flex;
    gap: 10px;
}

#place-bid-btn {
    flex: 2;
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border: none;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#place-bid-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.5);
}

#place-bid-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pass-btn {
    flex: 1;
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#pass-btn:hover {
    border-color: var(--error);
    color: var(--error);
}

/* Sidebar Right - Won Items */
.sidebar-right {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 20px;
    height: fit-content;
}

.sidebar-right h3 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    text-align: center;
}

#won-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
}

.won-item-thumb {
    background: rgba(212, 175, 55, 0.05);
    border: 2px solid;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.won-item-thumb:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.thumb-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.thumb-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: bold;
}

.thumb-value {
    font-size: 0.75rem;
    color: var(--accent-gold);
}

/* Notifications */
#notifications-area {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bid-notification {
    background: rgba(212, 175, 55, 0.9);
    color: var(--bg-primary);
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease-out;
}

.bid-notification.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

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

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* Auction Result Overlay */
.auction-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auction-result-overlay.show {
    opacity: 1;
}

.result-card {
    background: var(--bg-card);
    border: 3px solid;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.auction-result-overlay.show .result-card {
    transform: scale(1);
}

.result-card.win {
    border-color: var(--success);
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.5);
}

.result-card.lose {
    border-color: var(--error);
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.3);
}

.result-card h2 {
    font-size: 2rem;
    margin-bottom: 25px;
}

.result-card.win h2 {
    color: var(--success);
}

.result-card.lose h2 {
    color: var(--error);
}

.result-details p {
    margin: 15px 0;
    font-size: 1.1rem;
}

.result-details strong {
    color: var(--accent-gold);
}

.profit.positive {
    color: var(--success);
}

.profit.negative {
    color: var(--error);
}

.bonus.steal {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
}

.penalty.overpay {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
}

.bonus.good-deal {
    color: var(--success);
}

/* ========== RESULTS SCREEN ========== */
#results-screen {
    display: none;
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
}

.results-header {
    text-align: center;
    margin-bottom: 50px;
}

.results-header h2 {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

#final-score {
    font-size: 4rem;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.result-stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.result-stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-stat-card .value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-gold);
}

.results-section {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.results-section h3 {
    color: var(--accent-gold);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

#result-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    background: rgba(212, 175, 55, 0.05);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-gold);
}

.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-item-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.result-item-category {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.result-item-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.result-item-stats .profit {
    color: var(--success);
    font-weight: bold;
}

.result-item-stats .loss {
    color: var(--error);
    font-weight: bold;
}

.category-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.category-label {
    width: 150px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.category-progress {
    flex: 1;
    height: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.category-fill {
    height: 100%;
    transition: width 1s ease;
    border-radius: 12px;
}

.category-percentage {
    width: 50px;
    text-align: right;
    font-weight: bold;
    color: var(--accent-gold);
}

.results-actions {
    text-align: center;
    margin-top: 40px;
}

#new-game-btn {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border: none;
    padding: 20px 60px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#new-game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.5);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1200px) {
    .game-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar-left,
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .game-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 20px;
    }
    
    .header-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .game-title h1 {
        font-size: 1.5rem;
    }
    
    #mode-selection {
        padding: 20px;
    }
    
    .modes-grid {
        grid-template-columns: 1fr;
    }
    
    #auction-timer {
        font-size: 3rem;
    }
    
    .item-card {
        padding: 20px;
    }
    
    .item-name {
        font-size: 1.4rem;
    }
    
    .bid-actions {
        flex-direction: column;
    }
    
    #results-screen {
        padding: 20px;
    }
    
    .results-header h2 {
        font-size: 2rem;
    }
    
    #final-score {
        font-size: 2.5rem;
    }
}

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-bronze);
}

/* ========== UTILITY CLASSES ========== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Best Score Display */
.best-score {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
}

.best-score .label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.best-score .value {
    color: var(--accent-gold);
    font-weight: bold;
}

/* User Info Display */
.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.user-name {
    font-weight: bold;
    color: var(--accent-gold);
}

.user-level {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Bid Feedback */
.bid-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px 60px;
    background: var(--success);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 3000;
    animation: popIn 0.3s ease-out;
}

.bid-feedback.pass {
    background: var(--text-secondary);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}
