/* --- Refined UI for Number to Words Converter --- */
.calculator-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.section-header-custom {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.section-header-custom h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.calc-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    padding: 2.5rem;
    overflow: hidden;
}

/* Input Controls */
.input-group-custom {
    margin-bottom: 1.5rem;
}

.input-group-custom label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

.input-group-custom input[type="text"],
.input-group-custom select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    font-size: 1.05rem;
    color: #334155;
    transition: all 0.2s;
    outline: none;
}

.input-group-custom input[type="text"]:focus,
.input-group-custom select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: #fff;
}

.controls-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .controls-row {
        grid-template-columns: 1fr;
    }
}

/* Convert Button */
.convert-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.convert-btn:active {
    transform: translateY(0);
}

/* Result Boxes */
.results-area {
    margin-top: 2rem;
    border-top: 2px dashed #e2e8f0;
    padding-top: 2rem;
}

.result-box {
    margin-bottom: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    border-radius: 12px;
    position: relative;
    transition: border-color 0.2s;
}

.result-box:hover {
    border-color: #cbd5e1;
}

.result-box label {
    display: block;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-text {
    min-height: 48px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #1e293b;
    word-wrap: break-word;
    padding: 0.75rem;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    font-weight: 500;
}

.copy-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.copy-btn.copied {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.tooltip-icon {
    color: var(--primary);
    font-size: 0.9rem;
    margin-left: 4px;
    cursor: help;
}

/* SEO Table Styles */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.info-table th,
.info-table td {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.info-table th {
    background-color: #f8fafc;
    color: var(--text-main);
    font-weight: 700;
}

.info-table tr:nth-child(even) {
    background: #fcfcfc;
}

.highlight-card {
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 12px 12px 0;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

@media (min-width: 600px) {
    .example-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.example-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.example-card .num {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.example-card .word {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .calc-card {
        padding: 1.5rem;
    }
}