/* Converter Page Styles - Beautiful, Compact, Centered Design */

/* Hero Section */
.converter-hero {
    padding: 3rem 0 2rem;
    background: #f8f9fa;
    text-align: center;
}

.converter-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.75rem;
}

.converter-subtitle {
    font-size: 1rem;
    color: var(--muted-foreground);
    max-width: 500px;
    margin: 0 auto;
}

/* Converter Section - Centered Container */
.converter-section {
    padding: 2.5rem 0;
}

.converter-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Converter Card - Compact & Beautiful */
.converter-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.converter-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--foreground);
}

/* Converter Grid - Compact Layout */
.converter-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.875rem;
    align-items: end;
    margin-bottom: 1.25rem;
}

.converter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.converter-field label {
    font-size: 0.813rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.converter-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.938rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.converter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.converter-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: border-color 0.2s;
}

.converter-input:focus {
    outline: none;
    border-color: var(--primary);
}

.converter-input:read-only {
    background: #f9fafb;
}

/* Swap Button - Compact & Beautiful */
.swap-button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.swap-button:hover {
    transform: rotate(180deg);
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.swap-button:active {
    transform: rotate(180deg) scale(0.95);
}

/* Copy Button */
.copy-button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.copy-button:hover {
    color: var(--primary);
}

/* Result Display - Compact */
.result-display {
    text-align: center;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 10px;
    margin-top: 1rem;
}

.result-text {
    font-size: 1.125rem;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.result-formula {
    font-size: 0.813rem;
    color: var(--muted-foreground);
}

/* Conversion Table */
.conversion-table {
    width: 100%;
    border-collapse: collapse;
}

.conversion-table th {
    text-align: left;
    padding: 0.875rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--foreground);
    font-size: 0.938rem;
}

.conversion-table td {
    padding: 0.875rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.938rem;
}

.conversion-table tr:hover {
    background: #f9fafb;
}

/* Units Grid - Compact */
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.875rem;
    margin-top: 1.25rem;
}

.unit-card {
    padding: 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    transition: all 0.2s;
}

.unit-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.unit-card strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--foreground);
    font-size: 0.938rem;
}

.unit-card span {
    font-size: 0.813rem;
    color: var(--muted-foreground);
}

/* Related Converters Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.related-card {
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    transition: all 0.3s;
}

.related-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.related-card h3 {
    font-size: 1.063rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.related-card p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.875rem;
    line-height: 1.5;
}

.related-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.related-card a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .converter-hero {
        padding: 2rem 0 1.5rem;
    }

    .converter-title {
        font-size: 1.875rem;
    }

    .converter-subtitle {
        font-size: 0.938rem;
    }

    .converter-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .swap-button {
        margin: 0 auto;
        transform: rotate(90deg);
    }

    .swap-button:hover {
        transform: rotate(270deg);
    }

    .converter-card {
        padding: 1.5rem;
    }

    .units-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .converter-container {
        padding: 0 0.75rem;
    }

    .converter-card {
        padding: 1.25rem;
    }

    .result-display {
        padding: 1rem;
    }

    .result-text {
        font-size: 1rem;
    }
}