/* Decimal ↔ Fraction Converter Styles */

.dfc-converter-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.dfc-header {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    margin-bottom: 30px;
    border-radius: 8px;
}

.dfc-header-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
}

.dfc-header-subtitle {
    text-align: center;
    color: #6b7280;
    margin: 8px 0 0 0;
    font-size: 1rem;
}

.dfc-about-section {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
}

.dfc-about-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.dfc-about-description {
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

.dfc-converter-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 24px;
    border: 1px solid #e5e7eb;
    max-width: 400px;
    margin: 0 auto;
}

.dfc-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #1f2937;
    line-height: 1.2;
}

.dfc-section {
    margin-bottom: 20px;
}

.dfc-section:last-child {
    margin-bottom: 0;
}

.dfc-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

.dfc-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: #ffffff;
}

.dfc-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dfc-input::placeholder {
    color: #9ca3af;
}

.dfc-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.dfc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.dfc-btn-blue {
    background: #3b82f6;
    color: #ffffff;
}

.dfc-btn-blue:hover {
    background: #2563eb;
}

.dfc-btn-purple {
    background: #8b5cf6;
    color: #ffffff;
}

.dfc-btn-purple:hover {
    background: #7c3aed;
}

.dfc-result {
    margin-top: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    min-height: 1.5em;
    padding: 8px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #059669;
}

.dfc-result.error {
    color: #dc2626;
    background: #fef2f2;
}

.dfc-result.success {
    color: #059669;
    background: #f0fdf4;
}

.dfc-divider {
    border: none;
    height: 1px;
    background: #e5e7eb;
    margin: 24px 0;
}

.dfc-examples-section {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-top: 30px;
    border: 1px solid #e5e7eb;
}

.dfc-examples-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
}

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

.dfc-example-item {
    background: #f9fafb;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
}

.dfc-example-conversion {
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.dfc-example-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.dfc-footer {
    background: #1f2937;
    color: #ffffff;
    padding: 32px 0;
    margin-top: 48px;
    border-radius: 8px;
}

.dfc-footer-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.dfc-footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.dfc-footer-description {
    color: #d1d5db;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.dfc-footer-copyright {
    border-top: 1px solid #374151;
    padding-top: 16px;
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dfc-converter-container {
        margin: 15px 10px;
    }
    
    .dfc-header {
        padding: 16px 0;
        margin-bottom: 20px;
    }
    
    .dfc-header-title {
        font-size: 1.5rem;
    }
    
    .dfc-about-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .dfc-converter-card {
        padding: 20px;
        margin: 0 10px;
    }
    
    .dfc-title {
        font-size: 1.25rem;
    }
    
    .dfc-input {
        padding: 10px;
        font-size: 0.875rem;
    }
    
    .dfc-btn {
        padding: 10px 14px;
        font-size: 0.875rem;
    }
    
    .dfc-result {
        font-size: 1rem;
    }
    
    .dfc-examples-section {
        padding: 20px;
        margin-top: 20px;
    }
    
    .dfc-examples-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .dfc-footer {
        padding: 24px 0;
        margin-top: 32px;
    }
}

@media (max-width: 480px) {
    .dfc-converter-card {
        padding: 16px;
    }
    
    .dfc-title {
        font-size: 1.125rem;
        margin-bottom: 20px;
    }
    
    .dfc-section {
        margin-bottom: 16px;
    }
    
    .dfc-divider {
        margin: 20px 0;
    }
    
    .dfc-examples-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* WordPress Theme Compatibility */
.widget .dfc-converter-container {
    margin: 10px 0;
}

.widget .dfc-converter-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.widget .dfc-header,
.widget .dfc-about-section,
.widget .dfc-examples-section,
.widget .dfc-footer {
    display: none;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dfc-converter-card,
    .dfc-header,
    .dfc-about-section,
    .dfc-examples-section {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .dfc-title,
    .dfc-header-title,
    .dfc-about-title,
    .dfc-examples-title {
        color: #f9fafb;
    }
    
    .dfc-header-subtitle {
        color: #9ca3af;
    }
    
    .dfc-label {
        color: #d1d5db;
    }
    
    .dfc-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .dfc-input:focus {
        border-color: #60a5fa;
    }
    
    .dfc-input::placeholder {
        color: #6b7280;
    }
    
    .dfc-result {
        background: #374151;
        color: #34d399;
    }
    
    .dfc-result.error {
        background: #7f1d1d;
        color: #fca5a5;
    }
    
    .dfc-result.success {
        background: #064e3b;
        color: #34d399;
    }
    
    .dfc-divider {
        background: #4b5563;
    }
    
    .dfc-example-item {
        background: #374151;
    }
    
    .dfc-example-conversion {
        color: #f9fafb;
    }
    
    .dfc-example-description {
        color: #9ca3af;
    }
}

/* Loading Animation */
.dfc-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: dfc-spin 1s ease-in-out infinite;
}

@keyframes dfc-spin {
    to { transform: rotate(360deg); }
}

/* Success Animation */
.dfc-success {
    animation: dfc-pulse 0.6s ease;
}

@keyframes dfc-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
