/* Trading Tools Pro - Custom Styles */

/* CSS Variables for Pink Theme */
:root {
    --primary-pink: #ec4899;
    --light-pink: #fdf2f8;
    --dark-pink: #db2777;
    --gradient-start: #ec4899;
    --gradient-end: #db2777;
    --pink-100: #fce7f3;
    --pink-200: #fbcfe8;
    --pink-300: #f9a8d4;
    --pink-400: #f472b6;
    --pink-500: #ec4899;
    --pink-600: #db2777;
    --pink-700: #be185d;
    --pink-800: #9d174d;
    --pink-900: #831843;
    
    /* Shadows */
    --shadow-pink: 0 10px 25px rgba(236, 72, 153, 0.1);
    --shadow-pink-lg: 0 15px 35px rgba(236, 72, 153, 0.15);
    --shadow-pink-xl: 0 20px 45px rgba(236, 72, 153, 0.2);
    
    /* Gradients */
    --gradient-bg: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fbcfe8 100%);
    --gradient-button: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    background: var(--gradient-bg);
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #374151;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-pink);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-pink);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-pink);
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-pink);
}

/* Enhanced Card Styling */
.card {
    background: var(--gradient-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(236, 72, 153, 0.1);
    box-shadow: var(--shadow-pink);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-pink-lg);
    transform: translateY(-2px);
}

/* Button Enhancements */
.btn-gradient {
    background: var(--gradient-button);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-gradient:hover::before {
    left: 100%;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(236, 72, 153, 0.4);
}

/* Input Field Enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.15);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bounce Animation for Icons */
.bounce-icon {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Pulse Animation for Important Elements */
.pulse-pink {
    animation: pulsePink 2s infinite;
}

@keyframes pulsePink {
    0% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(236, 72, 153, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0);
    }
}

/* Result Box Styling */
.result-box {
    border-left: 4px solid var(--primary-pink);
    background: linear-gradient(135deg, var(--light-pink) 0%, #f3e8ff 100%);
    transition: all 0.3s ease;
}

.result-box.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.result-box.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.result-box.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: rgba(236, 72, 153, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-button);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Floating Elements */
.floating {
    animation: floating 3s ease-in-out infinite;
}

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

/* Sparkle Effects */
.sparkle {
    position: relative;
}

.sparkle::before,
.sparkle::after {
    content: '✨';
    position: absolute;
    font-size: 12px;
    opacity: 0;
    animation: sparkle 2s infinite;
}

.sparkle::before {
    top: -10px;
    left: -10px;
    animation-delay: 0s;
}

.sparkle::after {
    bottom: -10px;
    right: -10px;
    animation-delay: 1s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .mobile-center {
        text-align: center;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .mobile-stack {
        flex-direction: column;
    }
    
    .mobile-spacing {
        margin-bottom: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .crisp-edges {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        --bg-color: #1f2937;
        --text-color: #f9fafb;
        --card-bg: rgba(31, 41, 55, 0.8);
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--primary-pink);
    outline-offset: 2px;
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(236, 72, 153, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-pink);
    animation: spin 1s ease-in-out infinite;
}

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

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-pink);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Custom Checkbox Styles */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-pink);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.custom-checkbox:checked {
    background: var(--primary-pink);
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Success Messages */
.success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Error Messages */
.error-message {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Warning Messages */
.warning-message {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* Tab Styling */
.tab-button {
    background: rgba(255, 255, 255, 0.7);
    color: #6b7280;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-pink);
    transform: translateY(-2px);
}

.tab-button.active {
    background: var(--gradient-button);
    color: white;
    border-color: var(--primary-pink);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.3);
}

/* Calculator Sections */
.calculator-section {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Consistency Mode Buttons */
.consistency-mode-btn {
    background: rgba(255, 255, 255, 0.7);
    color: #6b7280;
    transition: all 0.3s ease;
}

.consistency-mode-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-pink);
}

.consistency-mode-btn.active {
    background: var(--gradient-button);
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

/* Mode Sections */
.consistency-mode {
    transition: all 0.3s ease;
}

.consistency-mode.hidden {
    display: none;
}