/* Area Calculator Styles - Modern Clean Design Following Styling Guide */

/* Body background matching styling guide */
body {
    background: linear-gradient(135deg, #f0f7ff 0%, #faf5ff 100%);
    min-height: 100vh;
}

.dark body {
    background: linear-gradient(135deg, #111827 0%, #1e3a8a 100%);
}

/* Calculator Card Component - Following Styling Guide */
.calculator-card {
    backdrop-filter: blur(20px);
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(59,130,246,0.05) 100%);
    border-radius: 1rem; /* rounded-2xl */
    box-shadow: 0 25px 50px -12px rgba(59,130,246, 0.25); /* shadow-2xl with theme tint */
    padding: 1.5rem; /* p-6 */
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(59,130,246, 0.4);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.anim-pop-in {
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* Input Styling */
.fancy-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    font-size: 16px;
}

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

.fancy-input:hover {
    border-color: #9ca3af;
}

/* Results Panel */
#results {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Solution Steps Styling */
.solution-step {
    background: rgba(255, 255, 255, 0.7);
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0 8px 8px 0;
}

.solution-step h4 {
    color: #1e40af;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.solution-step .formula {
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    margin: 0.5rem 0;
    color: #475569;
}

.solution-step .calculation {
    background: #ecfdf5;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    margin: 0.5rem 0;
    color: #047857;
}

/* Formula Reference Styling */
.formula-highlight {
    background: linear-gradient(90deg, #fef3c7, #fbbf24);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Shape Visualization Placeholder */
.shape-visual {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
    border: 2px dashed #9ca3af;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
    margin: 1rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calculator-card {
        padding: 1.5rem;
    }
    
    .fancy-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Dark mode support */
.dark .calculator-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9) 0%, rgba(59,130,246, 0.1) 100%);
}

.dark .fancy-input {
    background: rgba(31, 41, 55, 0.8);
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .fancy-input:focus {
    border-color: #60a5fa;
}

.dark .solution-step {
    background: rgba(31, 41, 55, 0.7);
    border-left-color: #60a5fa;
}

.dark .solution-step .formula {
    background: rgba(15, 23, 42, 0.8);
    color: #cbd5e1;
}

.dark .solution-step .calculation {
    background: rgba(6, 78, 59, 0.3);
    color: #34d399;
}

/* Print styles */
@media print {
    .calculator-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    nav, footer {
        display: none;
    }
}
