:root {
    --bg-dark: #0a0a0f;
    --bg-card: #13131f;
    --text-main: #e0e0e0;
    --text-muted: #a0a0b0;
    --neon-cyan: #00f3ff;
    --neon-magenta: #bc13fe;
    --neon-green: #0aff0a;
    --neon-red: #ff3333;
    --input-bg: #1a1a2e;
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 60px;
    /* Space for top button */
}

/* Top Button */
.top-center-button {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none;
    color: var(--neon-cyan);
    font-size: 0.9rem;
    padding: 8px 16px;
    border: 1px solid var(--neon-cyan);
    border-radius: 20px;
    transition: all 0.3s ease;
    background: rgba(0, 243, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.top-center-button:hover {
    background: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
    color: #fff;
}

/* Container */
.calculator-container {
    background: var(--bg-card);
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5),
        inset 0 0 2px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 20px;
}

/* Header */
.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.icon-wrapper {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px var(--neon-magenta));
}

h1 {
    font-size: 2rem;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calculator-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Input Area */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

textarea#numbers-input {
    width: 100%;
    height: 120px;
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    font-size: 1rem;
    font-family: 'Courier New', Courier, monospace;
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

textarea#numbers-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3), inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

textarea#numbers-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.neon-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.neon-btn.primary {
    background: linear-gradient(135deg, var(--neon-cyan), #00a8ff);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.neon-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.7);
}

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

.neon-btn.secondary {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
}

.neon-btn.secondary:hover {
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Error Message */
.error-message {
    text-align: center;
    color: var(--neon-red);
    min-height: 24px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.5);
}

/* Results Section */
.results-section {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.results-section.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    display: none;
    /* Actually hide it layout-wise */
}

.result-title {
    text-align: center;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.main-result {
    text-align: center;
    margin-bottom: 2rem;
    background: rgba(0, 243, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.main-result .label {
    display: block;
    color: var(--neon-cyan);
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.main-result .big-value {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
    border-color: rgba(188, 19, 254, 0.3);
}

.stat-card .label {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.stat-card .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neon-magenta);
}

/* Responsive */
@media (max-width: 600px) {
    .calculator-container {
        padding: 1.5rem;
        width: 95%;
    }

    h1 {
        font-size: 1.5rem;
    }

    .main-result .big-value {
        font-size: 2.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .neon-btn {
        width: 100%;
    }
}

/* SEO Content Section */
.seo-content {
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    color: var(--text-main);
    line-height: 1.8;
}

.seo-content h2 {
    color: var(--neon-cyan);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
    padding-bottom: 0.5rem;
}

.seo-content h2:first-of-type {
    margin-top: 0;
}

.seo-content h3 {
    color: var(--neon-magenta);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.seo-content h4 {
    color: #fff;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.seo-content p {
    margin-bottom: 1.5rem;
    color: #ccc;
}

.seo-content ul,
.seo-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    color: #ccc;
}

.seo-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 2rem 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: block;
}

/* Aligncenter class from user content */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Table Styling */
.seo-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    display: block;
    /* For responsiveness default behavior */
    overflow-x: auto;
    /* Enable horizontal scroll on small screens */
}

.seo-content th,
.seo-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    /* Prevent wrapping in cells causing weird layout */
}

.seo-content th {
    color: var(--neon-cyan);
    font-weight: 600;
}

.seo-content tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.seo-content a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: color 0.3s;
}

.seo-content a:hover {
    color: var(--neon-magenta);
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .seo-content {
        padding: 1.5rem;
        width: 95%;
    }

    .seo-content h2 {
        font-size: 1.5rem;
    }

    .seo-content img {
        width: 100%;
    }
}