:root {
    --bg-color: #0b0e14;
    --text-primary: #f0f3f8;
    --text-secondary: #a0a8b9;
    --neon-cyan: #00f3ff;
    --neon-purple: #bc13fe;
    --glass-bg: rgba(20, 25, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(188, 19, 254, 0.15), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(0, 243, 255, 0.15), transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Header */
.page-header {
    text-align: center;
    padding: 60px 20px 40px;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(188, 19, 254, 0.2);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Calculator Section */
.calculator-section {
    display: flex;
    justify-content: center;
}

.calculator {
    padding: 35px;
    width: 440px;
    border: 1px solid rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.1);
}

#screen {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    outline: none;
    font-size: 2.8em;
    text-align: right;
    color: var(--text-primary);
    margin-bottom: 25px;
    padding: 15px 20px;
    font-family: monospace;
    transition: box-shadow 0.3s ease;
}

#screen:focus {
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    border-color: rgba(0, 243, 255, 0.5);
}

.buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 12px;
}

.btn {
    border: 1px solid var(--glass-border);
    cursor: pointer;
    font-size: 1.1em;
    padding: 16px 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn:active {
    transform: translateY(1px);
}

.btn-op {
    color: var(--neon-cyan);
    background: rgba(0, 243, 255, 0.05);
    border-color: rgba(0, 243, 255, 0.2);
}
.btn-op:hover {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.btn-func {
    color: var(--neon-purple);
    background: rgba(188, 19, 254, 0.05);
}
.btn-func:hover {
    background: rgba(188, 19, 254, 0.15);
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.4);
}

.btn-clear {
    color: #ff3366;
    background: rgba(255, 51, 102, 0.05);
}
.btn-clear:hover {
    background: rgba(255, 51, 102, 0.15);
    border-color: #ff3366;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.4);
}

.btn-equal {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    color: #fff;
    border: none;
    font-size: 1.5em;
    grid-column: span 1;
}
.btn-equal:hover {
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
}

/* Content Blocks (Article, How-to, FAQ) */
.content-block {
    padding: 40px;
}

.content-block h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--neon-cyan);
}

.content-block h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* How to Use Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.step-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 16px;
    position: relative;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: rgba(188, 19, 254, 0.3);
}

.step-num {
    position: absolute;
    top: -15px;
    left: 20px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.step-card p {
    color: var(--text-secondary);
}

/* Article Styling */
.article-section article p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}
.article-section article p strong {
    color: var(--neon-cyan);
}
.article-section article p em {
    color: var(--neon-purple);
}
.article-section a {
    color: var(--neon-cyan);
    text-decoration: none;
    border-bottom: 1px dashed var(--neon-cyan);
    transition: all 0.3s;
}
.article-section a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--neon-cyan);
    border-bottom-color: #fff;
}

/* FAQ Accordion */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 20px;
    overflow: hidden;
    transition: border-color 0.3s;
}
.faq-item:hover {
    border-color: rgba(0, 243, 255, 0.3);
}

.faq-item summary {
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
    list-style: none; /* remove default arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--neon-cyan);
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
    color: var(--neon-purple);
}

.faq-content {
    padding: 15px 0 10px;
    color: var(--text-secondary);
    border-top: 1px solid var(--glass-border);
    margin-top: 10px;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Footer */
.page-footer {
    margin-top: 60px;
    padding: 40px 20px;
    text-align: center;
    border-radius: 24px 24px 0 0;
}

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links .external-link {
    color: var(--neon-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s, text-shadow 0.3s;
}

.footer-links .external-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.page-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    .calculator {
        width: 100%;
        padding: 20px;
    }
    .page-header h1 {
        font-size: 2.2rem;
    }
    .content-block {
        padding: 25px;
    }
}
