/* Modern Design System - Unified CSS for PCB Calculator */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --border-color: rgba(148, 163, 184, 0.2);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(148, 163, 184, 0.1);
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Glass Morphism Effect */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Modern Gradient Backgrounds */
.hero-gradient {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
}

.gradient-bg {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

/* Modern Input Styles */
.modern-input {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

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

/* Modern Button Styles */
.modern-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.modern-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 0.5s;
}

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

/* Preset Button Styles */
.preset-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.preset-btn.active {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border-color: transparent;
}

/* Modern Switch */
.custom-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.custom-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(148, 163, 184, 0.3);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 3px;
    background: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Result Cards */
.result-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Temperature Indicators */
.temp-indicator {
    transition: all 0.3s ease;
}

.temp-green { 
    background: linear-gradient(135deg, #10b981, #34d399); 
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.temp-yellow { 
    background: linear-gradient(135deg, #f59e0b, #fbbf24); 
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.temp-red { 
    background: linear-gradient(135deg, #ef4444, #f87171); 
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Animations */
.trace-diagram {
    animation: pulse 2s infinite;
}

.current-flow {
    animation: flow 3s linear infinite;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Smooth transitions */
* {
    transition: all 0.2s ease;
}

/* Blog specific styles */
.article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Article content styles */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.7;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    border-radius: 12px;
    margin: 2rem auto;
    max-width: 100%;
    height: auto;
}

.article-content pre {
    background: rgba(15, 23, 42, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.article-content code {
    background: rgba(59, 130, 246, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: var(--accent-primary);
}

.article-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    background: rgba(59, 130, 246, 0.05);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

/* Navigation styles */
.nav-link {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link.active {
    color: var(--accent-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glass-card {
        margin: 0.5rem;
    }
    
    .article-content {
        padding: 0 1rem;
    }
} 