* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.top-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    align-items: center;
}

.language-selector select {
    padding: 8px 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(45, 45, 45, 0.9);
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.light-theme .language-selector select {
    border: 2px solid rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.language-selector select:hover {
    background: rgba(60, 60, 60, 1);
    border-color: rgba(255, 255, 255, 0.4);
}

.light-theme .language-selector select:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.4);
}

.language-selector select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.theme-toggle button {
    padding: 8px 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(45, 45, 45, 0.9);
    color: #e0e0e0;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.light-theme .theme-toggle button {
    border: 2px solid rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.theme-toggle button:hover {
    background: rgba(60, 60, 60, 1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.light-theme .theme-toggle button:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.4);
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    padding-top: 20px;
}

.light-theme header {
    color: #333;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.light-theme header h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.calculator {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 30px;
    border: 1px solid #404040;
    transition: all 0.3s ease;
}

.light-theme .calculator {
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.input-group {
    margin-bottom: 20px;
}

.rate-group {
    margin-bottom: 20px;
}

.rate-type-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.rate-type-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #e0e0e0;
    transition: color 0.3s ease;
}

.light-theme .rate-type-selector label {
    color: #555;
}

.rate-type-selector input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #00d4ff;
}

.rate-type-selector label:hover {
    color: #00d4ff;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e0e0e0;
}

.light-theme .input-group label {
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #404040;
    border-radius: 8px;
    font-size: 16px;
    background: #1a1a1a;
    color: #e0e0e0;
    transition: border-color 0.3s ease;
}

.light-theme .input-group input {
    border: 2px solid #e1e5e9;
    background: white;
    color: #333;
}

.input-group input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.input-group input::placeholder {
    color: #888;
}

.light-theme .input-group input::placeholder {
    color: #999;
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: #2d2d2d;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    border: 1px solid #404040;
}

.light-theme .result-card {
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.light-theme .result-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.result-card h3 {
    color: #b0b0b0;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.light-theme .result-card h3 {
    color: #666;
}

.result-card p {
    font-size: 1.8rem;
    font-weight: bold;
    color: #00d4ff;
}

.result-card p.negative {
    color: #ff6b6b;
}

.chart-container {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #404040;
    transition: all 0.3s ease;
}

.light-theme .chart-container {
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .top-controls {
        position: relative;
        top: auto;
        right: auto;
        justify-content: center;
        margin-bottom: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .calculator {
        padding: 20px;
    }
    
    .results {
        grid-template-columns: 1fr;
    }
    
    .rate-type-selector {
        flex-direction: column;
        gap: 10px;
    }
}

/* Warren Buffett Section */
.warren-buffett-section {
    margin-top: 40px;
}

.buffett-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border: 1px solid #404040;
    transition: all 0.3s ease;
}

.light-theme .buffett-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.buffett-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}

.light-theme .buffett-card:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.buffett-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.buffett-name h3 {
    color: #00d4ff;
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    font-weight: 700;
    text-align: center;
}

.buffett-title {
    color: #b0b0b0;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
    text-align: center;
}

.light-theme .buffett-title {
    color: #666;
}

.buffett-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-item {
    background: rgba(0, 212, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(0, 212, 255, 0.15);
    transform: translateY(-2px);
}

.stat-label {
    display: block;
    color: #b0b0b0;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.light-theme .stat-label {
    color: #666;
}

.stat-value {
    display: block;
    color: #00d4ff;
    font-size: 1.5rem;
    font-weight: 700;
}

.buffett-quote {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #00d4ff;
    margin-top: 20px;
}

.light-theme .buffett-quote {
    background: rgba(0, 0, 0, 0.03);
}

.buffett-quote blockquote {
    color: #e0e0e0;
    font-size: 1.2rem;
    font-style: italic;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.light-theme .buffett-quote blockquote {
    color: #333;
}

.buffett-quote cite {
    color: #00d4ff;
    font-size: 1rem;
    font-weight: 600;
    font-style: normal;
}

@media (max-width: 768px) {
    .buffett-header {
        flex-direction: column;
        text-align: center;
    }
    
    .buffett-quote blockquote {
        font-size: 1.1rem;
    }
}

/* NASDAQ Section */
.nasdaq-section {
    margin-top: 30px;
}

.nasdaq-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border: 1px solid #404040;
    transition: all 0.3s ease;
}

.light-theme .nasdaq-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.nasdaq-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}

.light-theme .nasdaq-card:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.nasdaq-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.nasdaq-name h3 {
    color: #00d4ff;
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    font-weight: 700;
    text-align: center;
}

.nasdaq-title {
    color: #b0b0b0;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
    text-align: center;
}

.light-theme .nasdaq-title {
    color: #666;
}

.nasdaq-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.nasdaq-stats .stat-item {
    background: rgba(0, 212, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.nasdaq-stats .stat-item:hover {
    background: rgba(0, 212, 255, 0.15);
    transform: translateY(-2px);
}

.nasdaq-quote {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #00d4ff;
    margin-top: 20px;
}

.light-theme .nasdaq-quote {
    background: rgba(0, 0, 0, 0.03);
}

.nasdaq-quote blockquote {
    color: #e0e0e0;
    font-size: 1.2rem;
    font-style: italic;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.light-theme .nasdaq-quote blockquote {
    color: #333;
}

.nasdaq-quote cite {
    color: #00d4ff;
    font-size: 1rem;
    font-weight: 600;
    font-style: normal;
}

@media (max-width: 768px) {
    .nasdaq-header {
        flex-direction: column;
        text-align: center;
    }
    
    .nasdaq-quote blockquote {
        font-size: 1.1rem;
    }
} 