/* MSTY Millionaire - Original Dark Theme CSS */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0e1a;
    color: #e4e8f1;
    line-height: 1.6;
}

.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #0a0e1a 0%, #162033 50%, #0a0e1a 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: rgba(22, 32, 51, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #6366f1;
}

.hero-section {
    text-align: center;
    padding: 60px 0;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.ticker-card {
    background: rgba(22, 32, 51, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 15px;
    padding: 20px;
    transition: transform 0.3s;
}

.ticker-card:hover {
    transform: translateY(-5px);
    border-color: #6366f1;
}

.ticker-symbol {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6366f1;
}

.ticker-name {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.ticker-price {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
    color: #e4e8f1;
}

.ticker-change.positive {
    color: #22c55e;
}

.ticker-change.negative {
    color: #ef4444;
}

.ticker-yield {
    font-size: 1.2rem;
    color: #22c55e;
    font-weight: bold;
}

.quick-calculator {
    background: rgba(22, 32, 51, 0.8);
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0;
}

.calc-inline {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 20px;
}

.calc-inline input, .calc-inline select {
    padding: 12px 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: #fff;
}

.calc-result {
    font-size: 1.5rem;
    color: #22c55e;
    font-weight: bold;
}

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

.feature-card {
    background: rgba(22, 32, 51, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: #6366f1;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.ad-container {
    margin: 40px 0;
    padding: 20px;
    background: rgba(22, 32, 51, 0.6);
    border-radius: 15px;
    text-align: center;
    min-height: 100px;
}

.footer {
    background: rgba(22, 32, 51, 0.9);
    padding: 40px 0;
    margin-top: 100px;
    text-align: center;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
}

.live-indicator .live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    background-color: #e53e3e; /* Default to red/closed */
    transition: background-color 0.5s ease;
}

.live-indicator .live-dot.open {
    background-color: #48bb78; /* Green */
    animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.7);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(72, 187, 120, 0);
    }
}

.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .calc-inline {
        flex-direction: column;
    }
    
    .logo-section { flex-direction: column; align-items: flex-start; gap: 10px; }
    .market-indicator { font-size: 0.8rem; padding: 4px 12px; }
    .market-status-dot { width: 6px; height: 6px; }
}



/* Authentication Styles */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.auth-card {
    background: rgba(22, 32, 51, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.auth-card h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card p {
    color: #9ca3af;
    text-align: center;
    margin-bottom: 32px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #e4e8f1;
}

.form-group input {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: #e4e8f1;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    flex: 1;
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #e4e8f1;
}

.form-group small {
    color: #9ca3af;
    font-size: 14px;
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #6366f1;
}

.checkbox-label a {
    color: #6366f1;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.auth-submit-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
}

.auth-footer p {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 8px;
}

.auth-footer a {
    color: #6366f1;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* User Menu Styles */
.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.auth-button {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-button {
    color: #e4e8f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.login-button:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
}

.signup-button {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
}

.signup-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-email {
    color: #e4e8f1;
    font-size: 14px;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* Portfolio Styles */
.portfolio-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.metric-card {
    background: rgba(22, 32, 51, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.metric-card h3 {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: #e4e8f1;
}

.metric-card .value.positive {
    color: #10b981;
}

.metric-card .value.negative {
    color: #ef4444;
}

.holdings-table {
    background: rgba(22, 32, 51, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.holdings-table table {
    width: 100%;
    border-collapse: collapse;
}

.holdings-table th,
.holdings-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.holdings-table th {
    background: rgba(15, 23, 42, 0.8);
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.holdings-table td {
    color: #e4e8f1;
}

.holdings-table .positive {
    color: #10b981;
}

.holdings-table .negative {
    color: #ef4444;
}

.holdings-table button {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 4px;
    transition: all 0.3s ease;
}

.holdings-table button:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
}

.holdings-table .delete-holding-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.holdings-table .delete-holding-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        margin: 20px;
        padding: 24px;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 8px;
    }
    
    .portfolio-metrics {
        grid-template-columns: 1fr;
    }
    
    .holdings-table {
        overflow-x: auto;
    }
    
    .holdings-table table {
        min-width: 600px;
    }
}

/* --- MSTY Millionaire: Header & Navigation Enhancements --- */
.logo-section { display: flex; align-items: center; gap: 20px; }

.market-indicator { display: inline-flex; align-items: center; gap: 8px; background: rgba(34, 197, 94, 0.2); padding: 5px 15px; border-radius: 20px; transition: background 0.3s ease; }

.market-status-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; transition: background 0.3s ease; animation: blink 1.2s infinite; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.nav-link { position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: linear-gradient(90deg, #6366f1, #8b5cf6); transition: width 0.3s ease; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover, .nav-link.active { color: #6366f1; }

