/* Custom CSS for Mirror Math Resonance website */

:root {
    --primary-color: #2980b9;
    --secondary-color: #34495e;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* Mathematical formulas styling */
.math-formula, .math-display {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    text-align: center;
}

.math-formula {
    font-size: 0.9rem;
}

.math-display {
    font-size: 1.1rem;
}

/* Card enhancements */
.card {
    border: none;
    border-radius: 0.5rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    font-weight: 600;
}

/* Navigation styling */
.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover {
    color: var(--warning-color) !important;
}

/* Interactive elements */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(41, 128, 185, 0.25);
}

.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Calculator section styling */
#pyramidVisualization {
    background-color: #fff;
    border: 2px solid #dee2e6;
}

/* Chart containers */
canvas {
    max-width: 100%;
    height: auto;
}

/* Results tables */
.table td {
    border-top: 1px solid #dee2e6;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.table td:first-child {
    font-weight: 500;
    color: var(--dark-color);
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: rgba(52, 152, 219, 0.1);
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: rgba(39, 174, 96, 0.1);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: rgba(243, 156, 18, 0.1);
}

.alert-primary {
    border-left-color: var(--primary-color);
    background-color: rgba(41, 128, 185, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .math-formula, .math-display {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table td {
        font-size: 0.8rem;
        padding: 0.25rem;
    }
}

/* Animation for loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Progress indicators */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

/* Icon styling */
.fas, .far {
    margin-right: 0.25rem;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Custom scrollbar for math displays */
.math-display::-webkit-scrollbar {
    height: 8px;
}

.math-display::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.math-display::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.math-display::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Social sharing enhancements */
.share-btn {
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.share-btn:hover::before {
    width: 300px;
    height: 300px;
}

.share-dropdown .dropdown-item {
    padding: 8px 16px;
    transition: background-color 0.2s ease;
}

.share-dropdown .dropdown-item:hover {
    background-color: rgba(243, 156, 18, 0.1);
}

.share-dropdown .dropdown-item i {
    width: 20px;
    margin-right: 8px;
}

/* Floating action button for mobile */
.fab-share {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.fab-share:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.6);
    color: white;
}

/* Show FAB on mobile */
@media (max-width: 768px) {
    .fab-share {
        display: flex;
    }
    
    .navbar .share-btn {
        display: none !important;
    }
}

/* Share notification animations */
.share-notification {
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.3) translateX(100%); opacity: 0; }
    50% { transform: scale(1.05) translateX(0); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

/* Discovery highlight effect */
.discovery-highlight {
    background: linear-gradient(90deg, transparent 0%, rgba(243, 156, 18, 0.1) 50%, transparent 100%);
    animation: highlight-sweep 2s ease-in-out;
}

@keyframes highlight-sweep {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}

/* Social platform icons styling */
.fab-twitter { color: #1da1f2 !important; }
.fab-facebook { color: #4267b2 !important; }
.fab-linkedin { color: #0077b5 !important; }
.fab-reddit { color: #ff4500 !important; }
.fab-whatsapp { color: #25d366 !important; }
.fab-telegram { color: #0088cc !important; }

/* Pulse animation for share buttons */
.pulse-share {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(243, 156, 18, 0); }
    100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}
