/* Enhanced Hackenomics Game Styles */

/* Import Google Fonts for better readability */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #eff6ff;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #f1f5f9 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Improvements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }

p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Game Layout */
.game-layout {
    display: flex;
    max-width: 1800px;
    margin: 0 auto;
    gap: 24px;
    padding: 20px;
    min-height: 100vh;
}

.main-game {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 380px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-xl);
    padding: 24px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
    height: fit-content;
    position: sticky;
    top: 20px;
    transition: var(--transition-normal);
}

.sidebar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2xl);
}

.sidebar h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Enhanced Card Styles */
.info-card, .tip-card, .progress-tracker {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.info-card::before, .tip-card::before, .progress-tracker::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left var(--transition-slow);
}

.info-card:hover::before, .tip-card:hover::before, .progress-tracker:hover::before {
    left: 100%;
}

.info-card:hover, .tip-card:hover, .progress-tracker:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.info-card h4, .tip-card h4, .progress-tracker h4 {
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-card p, .tip-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Credit Score Card Enhancements */
.credit-score-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.credit-score-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color), var(--warning-color));
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.credit-score-card:hover::after {
    transform: scaleX(1);
}

.credit-score-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.credit-score-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 8px 0;
    transition: all var(--transition-normal);
    color: var(--primary-dark);
    font-family: 'JetBrains Mono', monospace;
}

.credit-score-range {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.credit-score-factors {
    margin-top: 12px;
}

.credit-score-factor {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.85rem;
    padding: 3px 0;
}

.credit-score-factor:last-child {
    margin-bottom: 0;
    padding-top: 6px;
    border-top: 1px solid var(--border-light);
}

.credit-score-factor-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.credit-score-factor-value {
    font-weight: 600;
    color: var(--primary-dark);
    font-family: 'JetBrains Mono', monospace;
}

/* Progress Tracker Enhancements */
.progress-container {
    position: relative;
    margin-bottom: 10px;
}

.progress-background {
    background: rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    height: 8px;
    width: 100%;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    height: 100%;
    width: 3.33%;
    transition: width 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.3) 0%, 
        rgba(255,255,255,0.5) 50%, 
        rgba(255,255,255,0.3) 100%);
    animation: shimmer 2s infinite;
}

.progress-marker {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translateX(-8px);
    transition: left 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: var(--shadow-sm);
}

.progress-text {
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

/* Game Stats Enhancements */
.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 20px 18px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: all var(--transition-normal);
}

.stat-card:hover::before {
    height: 4px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    transition: all var(--transition-normal);
}

/* Enhanced Investment Cards */
.investment-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.investment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.investment-card:hover::before {
    opacity: 1;
}

.investment-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: white;
}

.investment-card.debt-card {
    border: 2px solid #fca5a5;
    background: #fef2f2;
}

.investment-card.debt-card::before {
    background: linear-gradient(90deg, var(--danger-color), #ef4444);
}

.investment-card.debt-card:hover {
    border-color: var(--danger-color);
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.15);
    background: #fefefe;
}

.investment-card h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.debt-card h4 {
    color: var(--danger-color);
}

.investment-card p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all var(--transition-normal);
}

.debt-card .price-info {
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.1);
}

.current-price {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
}

.price-change {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    transition: all var(--transition-normal);
}

.price-up {
    color: var(--success-color);
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.price-down {
    color: var(--danger-color);
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.investment-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.amount-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    background: white;
}

.amount-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: scale(1.01);
}

.invest-btn {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    min-width: 120px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.invest-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.invest-btn:hover::before {
    left: 100%;
}

.invest-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.invest-btn:active {
    transform: translateY(-1px) scale(1.01);
}

.invest-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.debt-btn {
    background: linear-gradient(135deg, var(--danger-color), #ef4444);
}

.debt-btn:hover {
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, #b91c1c, var(--danger-color));
}

/* Enhanced Buttons */
.next-period-btn, .reset-btn {
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.next-period-btn {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.reset-btn {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
}

.next-period-btn:hover, .reset-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Enhanced Dialog/Notification System */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.notification-overlay.show {
    opacity: 1;
    visibility: visible;
}

.notification-dialog {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    transform: scale(0.7) translateY(50px);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.notification-overlay.show .notification-dialog {
    transform: scale(1) translateY(0);
}

.notification-dialog.success {
    border-color: var(--success-color);
    background: white;
}

.notification-dialog.warning {
    border-color: var(--warning-color);
    background: white;
}

.notification-dialog.error {
    border-color: var(--danger-color);
    background: white;
}

.notification-dialog.info {
    border-color: var(--info-color);
    background: white;
}

.notification-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out;
}

.notification-title {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.notification-message {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.notification-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.notification-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Enhanced Game Over Popup */
.game-over-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.game-over-popup.show {
    opacity: 1;
    visibility: visible;
}

.game-over-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    transform: scale(0.7) translateY(50px);
    transition: all var(--transition-slow) cubic-bezier(0.25, 0.1, 0.25, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.game-over-popup.show .game-over-content {
    transform: scale(1) translateY(0);
}

.game-over-content.success {
    border-color: var(--success-color);
    background: white;
}

.game-over-content.failure {
    border-color: var(--danger-color);
    background: white;
}

.game-over-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out;
}

.game-over-title {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.game-over-subtitle {
    font-size: 1.2em;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.game-over-stats {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.game-over-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.game-over-stat:last-child {
    margin-bottom: 0;
    font-weight: 700;
    font-size: 1.3em;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.game-over-stat-label {
    color: var(--text-secondary);
}

.game-over-stat-value {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.game-over-stat-value.positive {
    color: var(--success-color);
}

.game-over-stat-value.negative {
    color: var(--danger-color);
}

.game-over-message {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 20px 0;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-accent);
    border-left: 4px solid var(--primary-color);
}

.game-over-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 25px;
}

.game-over-btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-over-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.game-over-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.game-over-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.game-over-btn.secondary:hover {
    background: var(--bg-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Additional White Background Sections */
.container {
    width: 100%;
}

.header {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 32px;
    padding: 24px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
}

.header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.header p {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.news-section {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.news-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.news-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.news-section h3 {
    margin-bottom: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.news-section p {
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.debt-section, .investment-section {
    background: white;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
}

.debt-section:hover, .investment-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.debt-section h2, .investment-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.debt-section h2 {
    color: var(--danger-color);
    border-bottom-color: #fecaca;
}

.debt-options, .investment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.portfolio-section {
    background: white;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
}

.portfolio-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.portfolio-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.portfolio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
}

.portfolio-item:hover {
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.02), transparent);
    padding-left: 12px;
    padding-right: 12px;
    border-radius: var(--radius-md);
    transform: translateX(4px);
}

.portfolio-item:last-child {
    border-bottom: none;
}

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

.portfolio-item small {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.debt-item {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.02), rgba(220, 38, 38, 0.05), rgba(220, 38, 38, 0.02));
    border: 1px solid rgba(220, 38, 38, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 8px 0;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
}

.debt-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.controls {
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.next-period-btn, .reset-btn {
    background: linear-gradient(135deg, var(--success-color), #10b981);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 160px;
    box-shadow: var(--shadow-md);
}

.reset-btn {
    background: linear-gradient(135deg, #475569, #64748b);
}

.next-period-btn:hover, .reset-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.next-period-btn:hover {
    background: linear-gradient(135deg, #047857, var(--success-color));
}

.reset-btn:hover {
    background: linear-gradient(135deg, #334155, #475569);
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes confetti {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes slideInUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Confetti Animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #fbbf24;
    animation: confetti 3s linear infinite;
    z-index: 999;
}

.confetti:nth-child(2n) {
    background: var(--success-color);
    animation-delay: 0.5s;
}

.confetti:nth-child(3n) {
    background: var(--primary-color);
    animation-delay: 1s;
}

.confetti:nth-child(4n) {
    background: var(--danger-color);
    animation-delay: 1.5s;
}

.confetti:nth-child(5n) {
    background: #8b5cf6;
    animation-delay: 2s;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .game-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .game-layout {
        padding: 16px;
        gap: 16px;
    }
    
    .sidebar {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2.2em;
    }
    
    .game-stats {
        grid-template-columns: 1fr;
    }
    
    .investment-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .amount-input {
        width: 100%;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .next-period-btn, .reset-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .notification-dialog {
        padding: 24px;
        margin: 20px;
    }
    
    .game-over-content {
        padding: 24px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 24px 16px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
    
    .credit-score-value {
        font-size: 2.5em;
    }
    
    .game-over-title {
        font-size: 2em;
    }
    
    .game-over-buttons {
        flex-direction: column;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-sans { font-family: 'Inter', sans-serif; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-info { color: var(--info-color); }

.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-accent { background-color: var(--bg-accent); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.transition-fast { transition: var(--transition-fast); }
.transition-normal { transition: var(--transition-normal); }
.transition-slow { transition: var(--transition-slow); }

/* Restructuring Section Styles */
.restructuring-section {
    background: white;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
}

.restructuring-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.restructuring-section h3 {
    color: var(--primary-dark);
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.restructuring-option {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
}

.restructuring-option:hover {
    background: var(--bg-accent);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.restructuring-option h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 1rem;
}

.restructuring-option p {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

.restructuring-option .rate-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-dark);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.restructuring-option .fee-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.restructuring-option .fee-badge:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.restructuring-controls {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 16px;
    transition: all var(--transition-normal);
}

.debt-checkbox {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    background: white;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: pointer;
}

.debt-checkbox:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.debt-checkbox input {
    margin-right: 12px;
}

.debt-checkbox-label {
    flex: 1;
}

.debt-checkbox-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.debt-checkbox-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.execute-restructuring-btn {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}

.execute-restructuring-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.cancel-restructuring-btn {
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal) cubic-bezier(0.25, 0.1, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.cancel-restructuring-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.charts-section {
    margin: 32px 0 0 0;
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px 18px 32px 18px;
    box-shadow: 0 2px 12px #0001;
}

.charts-section h2 {
    margin-bottom: 12px;
    color: #2563eb;
}

.sell-btn {
    background: #b91c1c;
    color: #fff;
    border: 1.5px solid #991b1b;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.98em;
    cursor: pointer;
    transition: all 0.16s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 1px 6px #991b1b22;
    letter-spacing: 0.1px;
    text-transform: none;
}

.sell-btn:hover {
    background: #991b1b;
    border-color: #7f1d1d;
    outline: 2px solid #f59e0b33;
    box-shadow: 0 2px 12px #991b1b33;
}
