/* 
 * Circle Calculator - Premium Glassmorphism Design
 * Modern, Responsive, and Vibrant
 */

:root {
    --primary-color: #4f46e5;
    /* Indigo */
    --secondary-color: #ec4899;
    /* Pink */
    --accent-color: #8b5cf6;
    /* Violet */
    --text-color: #ffffff;
    --text-muted: #cbd5e1;
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
    --success-color: #10b981;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.3);
}

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

body {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.2) 0%, transparent 40%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Return Button */
.return-btn-container {
    width: 100%;
    max-width: 900px;
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
}

.return-btn {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.return-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Main Container */
.calculator-container {
    width: 100%;
    max-width: 900px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

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

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.input-group {
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    font-size: 1.2rem;
    pointer-events: none;
}

.calc-input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1.1rem;
    color: var(--text-color);
    font-family: inherit;
    transition: all 0.3s ease;
}

.calc-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.calc-input::placeholder {
    color: rgba(203, 213, 225, 0.3);
}

.input-group:focus-within label {
    color: var(--primary-color);
}

/* Actions */
.actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.btn {
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Results Area */
.results-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: none;
    /* Hidden by default */
}

.results-section.visible {
    display: block;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.result-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
}

.result-card h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.result-value {
    font-size: 1.4rem;
    font-weight: 700;
    word-break: break-all;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.formula-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 5px;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
}

.info-box h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.info-list {
    list-style: none;
}

.info-list li {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
    color: var(--text-muted);
}

.info-list li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -4px;
}

.info-list li strong {
    color: var(--text-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .calculator-container {
        padding: 25px;
    }

    .header h1 {
        font-size: 2.2rem;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }


    /* SEO Content Section */
    .content-section {
        width: 100%;
        max-width: 900px;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 24px;
        padding: 40px;
        margin-top: 40px;
        color: var(--text-color);
    }

    .content-section h2 {
        font-size: 2rem;
        margin-top: 40px;
        margin-bottom: 20px;
        color: var(--text-color);
        background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .content-section h3 {
        font-size: 1.5rem;
        margin-top: 30px;
        margin-bottom: 15px;
        color: var(--secondary-color);
    }

    .content-section p {
        margin-bottom: 20px;
        font-size: 1.1rem;
        color: var(--text-muted);
    }

    .content-section ul,
    .content-section ol {
        margin-bottom: 25px;
        padding-left: 25px;
        color: var(--text-muted);
    }

    .content-section li {
        margin-bottom: 10px;
        font-size: 1.05rem;
    }

    .content-section strong {
        color: var(--text-color);
    }

    .content-section a {
        color: var(--primary-color);
        text-decoration: none;
        border-bottom: 1px solid transparent;
        transition: border-color 0.3s;
    }

    .content-section a:hover {
        border-bottom-color: var(--primary-color);
    }

    /* Images in Content */
    .content-section img {
        max-width: 100%;
        height: auto;
        border-radius: 16px;
        margin: 30px auto;
        display: block;
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--glass-border);
    }

    /* Data Tables */
    .content-section table {
        width: 100%;
        border-collapse: collapse;
        margin: 30px 0;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 12px;
        overflow: hidden;
    }

    .content-section th,
    .content-section td {
        padding: 15px 20px;
        text-align: left;
        border-bottom: 1px solid var(--glass-border);
    }

    .content-section th {
        background: rgba(79, 70, 229, 0.1);
        color: var(--text-color);
        font-weight: 600;
    }

    .content-section td {
        color: var(--text-muted);
    }

    .content-section tr:last-child td {
        border-bottom: none;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        .content-section {
            padding: 25px;
        }

        .content-section h2 {
            font-size: 1.8rem;
        }

        .content-section table {
            display: block;
            overflow-x: auto;
        }
    }