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

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --secondary: #34a853;
    --danger: #ea4335;
    --warning: #fbbc04;
    --dark: #202124;
    --gray: #5f6368;
    --light-gray: #f1f3f4;
    --border: #dadce0;
    --white: #ffffff;
    --positive: #34a853;
    --negative: #ea4335;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

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

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 0;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--light-gray);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-primary-large, .btn-outline-large {
    padding: 16px 40px;
    font-size: 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
}

.btn-primary-large {
    background: var(--primary);
    color: var(--white);
}

.btn-primary-large:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-outline-large {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-large:hover {
    background: var(--primary);
    color: var(--white);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
}

/* Market Overview */
.market-overview {
    padding: 60px 0;
    background: var(--light-gray);
}

.market-overview h2 {
    font-size: 32px;
    margin-bottom: 32px;
    text-align: center;
}

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

.market-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.market-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

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

.market-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.market-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.market-badge.us {
    background: #e8f0fe;
    color: #1a73e8;
}

.market-badge.hk {
    background: #fce8e6;
    color: #d93025;
}

.market-badge.cn {
    background: #fef7e0;
    color: #f9ab00;
}

.market-price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.market-change {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.market-price.positive,
.market-change.positive {
    color: var(--positive);
}

.market-price.negative,
.market-change.negative {
    color: var(--negative);
}

.market-time {
    font-size: 12px;
    color: var(--gray);
}

/* Top Movers */
.top-movers {
    padding: 60px 0;
}

.top-movers h2 {
    font-size: 32px;
    margin-bottom: 32px;
    text-align: center;
}

.movers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.movers-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.movers-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--dark);
}

.stock-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--light-gray);
    border-radius: 8px;
    transition: background 0.2s;
}

.stock-item:hover {
    background: #e8eaed;
}

.stock-info {
    display: flex;
    flex-direction: column;
}

.stock-symbol {
    font-weight: 600;
    font-size: 16px;
    color: var(--dark);
}

.stock-name {
    font-size: 13px;
    color: var(--gray);
}

.stock-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stock-price .price {
    font-weight: 600;
    font-size: 16px;
}

.stock-price .change {
    font-size: 13px;
    font-weight: 600;
}

.stock-price .change.positive {
    color: var(--positive);
}

.stock-price .change.negative {
    color: var(--negative);
}

/* Features */
.features {
    padding: 60px 0;
    background: var(--light-gray);
}

.features h2 {
    font-size: 32px;
    margin-bottom: 48px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: var(--white);
}

.cta h2 {
    font-size: 40px;
    margin-bottom: 16px;
}

.cta p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-section p {
    color: #9aa0a6;
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #9aa0a6;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 16px;
}

.footer-bottom {
    border-top: 1px solid #3c4043;
    padding-top: 20px;
    text-align: center;
    color: #9aa0a6;
}

.footer-bottom p {
    margin-bottom: 8px;
}

.disclaimer {
    font-size: 12px;
    font-style: italic;
}

/* Login/Register Forms */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    background: var(--light-gray);
}

.auth-box {
    background: var(--white);
    padding: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    max-width: 440px;
    width: 100%;
}

.auth-box h1 {
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
}

.auth-box .subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.form-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
}

.form-link:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--gray);
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--gray);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider span {
    padding: 0 16px;
    font-size: 14px;
}

/* Content Pages */
.page-header {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 40px;
    margin-bottom: 16px;
}

.page-header p {
    font-size: 18px;
    opacity: 0.95;
}

.content-section {
    padding: 60px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.content-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.content-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.content-card p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

.content-card .meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--gray);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav {
        gap: 16px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .market-grid,
    .movers-grid,
    .features-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .auth-box {
        padding: 32px 24px;
    }
}
