/* Decimal to Fractional Calculator Styles */

.decimal-to-fractional-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-2xl, 3rem) var(--space-md, 1rem);
}

/* Calculator Header */
.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: 0.5rem;
}

.calculator-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary, #a0a0a0);
}

/* Calculator Section */
.calculator-section {
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

/* Info Box */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.1) 0%, rgba(0, 191, 255, 0.05) 100%);
    border: 2px solid rgba(0, 191, 255, 0.4);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.info-icon {
    flex-shrink: 0;
    color: #00bfff;
}

.info-content {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.6;
}

.info-content strong {
    color: #00bfff;
    display: inline;
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 968px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

.calculator-inputs,
.calculator-results {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 1.5rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-secondary, #a0a0a0);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Converter Container */
.converter-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
    .converter-container {
        flex-direction: column;
    }
}

.input-column,
.output-column {
    flex: 1;
}

.converter-container label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary, #fff);
    margin-bottom: 0.5rem;
}

.calculator-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 8px;
    color: var(--text-primary, #fff);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.calculator-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-tertiary, #666);
    margin-top: 0.25rem;
}

.output-display {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    color: #10b981;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conversion-arrow {
    flex-shrink: 0;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 576px) {
    .conversion-arrow {
        transform: rotate(90deg);
    }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-calculate,
.btn-reset {
    flex: 1;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-calculate {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-reset {
    background: var(--bg-surface, #1a1a1a);
    color: var(--text-secondary, #a0a0a0);
    border: 2px solid var(--border-subtle, #333);
}

.btn-reset:hover {
    border-color: #10b981;
    color: #10b981;
}

/* Examples Box */
.examples-box {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle, #333);
}

.examples-box h3 {
    font-size: 1rem;
    color: var(--text-primary, #fff);
    margin-bottom: 1rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 576px) {
    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.example-btn {
    padding: 0.625rem 1rem;
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 6px;
    color: var(--text-secondary, #a0a0a0);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-btn:hover {
    border-color: #10b981;
    color: #10b981;
    transform: translateY(-1px);
}

/* Results Section */
.results-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 1rem;
}

.result-card {
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.result-card:last-child {
    margin-bottom: 0;
}

.result-label {
    font-size: 0.85rem;
    color: var(--text-tertiary, #666);
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #10b981;
}

/* Info Section */
.info-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 12px;
}

.info-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 1rem;
}

.info-section > p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.info-section strong {
    color: var(--text-primary, #fff);
}

/* Formula Box */
.formula-box {
    background: var(--bg-elevated, #242424);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.formula-box h3 {
    font-size: 1.1rem;
    color: #10b981;
    margin-bottom: 0.75rem;
}

.formula-box p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.formula-box ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.formula-box ul li {
    color: var(--text-secondary, #a0a0a0);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.formula-box ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.formula-box p.example {
    font-style: italic;
    color: var(--text-tertiary, #666);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle, #333);
}

/* Info Grid - 3 Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 968px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: #10b981;
    transform: translateY(-2px);
}

.info-card h3 {
    font-size: 1.2rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.info-card p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-card p.note {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-tertiary, #666);
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle, #333);
}

/* Math Examples Grid */
.math-examples {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 968px) {
    .math-examples {
        grid-template-columns: 1fr;
    }
}

.math-example {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 1.5rem;
}

.math-example h4 {
    font-size: 1.1rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.math-example p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.math-example p:last-child {
    margin-bottom: 0;
}

.math-example strong {
    color: var(--text-primary, #fff);
}

/* Tips Grid - 6 Cards */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 968px) {
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

.tip-card {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tip-card:hover {
    border-color: #10b981;
    transform: translateY(-2px);
}

.tip-card h4 {
    font-size: 1rem;
    color: #10b981;
    margin-bottom: 0.75rem;
}

.tip-card p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Conversion Table */
.conversion-table-wrapper {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.conversion-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    overflow: hidden;
}

.conversion-table thead {
    background: rgba(16, 185, 129, 0.1);
}

.conversion-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #10b981;
    border-bottom: 2px solid var(--border-subtle, #333);
}

.conversion-table td {
    padding: 1rem;
    color: var(--text-secondary, #a0a0a0);
    border-bottom: 1px solid var(--border-subtle, #333);
}

.conversion-table tbody tr:last-child td {
    border-bottom: none;
}

.conversion-table tbody tr:hover {
    background: rgba(16, 185, 129, 0.05);
}

/* FAQ Section */
.faq-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 12px;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.pf-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pf-accordion-item {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pf-accordion-item:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

.pf-accordion-item[open] {
    border-color: #10b981;
}

.pf-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
}

.pf-accordion-summary::-webkit-details-marker {
    display: none;
}

.pf-accordion-question {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    padding-right: 1rem;
}

.pf-accordion-icon {
    flex-shrink: 0;
    color: #10b981;
    transition: transform 0.3s ease;
}

.pf-accordion-item[open] .pf-accordion-icon {
    transform: rotate(45deg);
}

.pf-accordion-content {
    padding: 0 1.5rem 1.25rem;
}

.pf-accordion-content p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
}

/* Related Tools Section */
.related-tools-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 12px;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 2rem;
}

.related-tools-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 0.5rem;
}

.related-tools-header p {
    color: var(--text-secondary, #a0a0a0);
    font-size: 1rem;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}

.related-tool-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-tool-card:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.tool-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    color: #10b981;
}

.tool-card-content {
    flex: 1;
}

.tool-card-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 0.25rem;
}

.tool-card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary, #a0a0a0);
}

.tool-card-arrow {
    flex-shrink: 0;
    color: var(--text-tertiary, #666);
    transition: all 0.3s ease;
}

.related-tool-card:hover .tool-card-arrow {
    color: #10b981;
    transform: translateX(4px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .calculator-title {
        font-size: 2rem;
    }

    .info-section,
    .faq-section,
    .related-tools-section {
        padding: 1.5rem;
    }

    .calculator-section {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .decimal-to-fractional-page {
        padding: 2rem 1rem;
    }

    .calculator-title {
        font-size: 1.75rem;
    }

    .calculator-subtitle {
        font-size: 1rem;
    }

    .info-section h2,
    .section-header h2,
    .related-tools-header h2 {
        font-size: 1.5rem;
    }
}
