/**
 * dcaXRP Custom Styles
 * Digital Masterpiece Design with Gradients and Modern Effects
 */

/* === ROOT VARIABLES === */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-crypto: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    
    --box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --transition-base: all 0.3s ease;
}

/* === GLOBAL STYLES === */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* === NAVIGATION === */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
    transition: var(--transition-base);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: var(--transition-base);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* === HERO SECTION === */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-image {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 2rem;
    animation: float 6s ease-in-out infinite;
}

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

.hero-image i {
    animation: pulse 2s ease-in-out infinite;
}

.hero-image i:nth-child(2) {
    animation-delay: 0.3s;
}

.hero-image i:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* === CALCULATOR SECTION === */
.calculator-section {
    position: relative;
}

.card {
    border-radius: 1rem;
    transition: var(--transition-base);
}

.card-header.bg-gradient {
    background: var(--gradient-primary) !important;
    border-radius: 1rem 1rem 0 0 !important;
}

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

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 2px solid #e0e0e0;
    transition: var(--transition-base);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    border-radius: 0.5rem;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
}

.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* === KPI CARDS === */
.kpi-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
}

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

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.kpi-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profit-positive {
    color: var(--success-color);
}

.profit-negative {
    color: var(--danger-color);
}

/* === CHART CONTAINER === */
#dcaChart {
    max-height: 400px;
}

/* === TABLE === */
.table-responsive {
    border-radius: 0 0 1rem 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.table {
    margin-bottom: 0;
}

.table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;
}

.table-hover tbody tr {
    transition: var(--transition-base);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: scale(1.01);
}

/* === SHARE SECTION === */
.bg-gradient-share {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.bg-gradient-share .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* === AFFILIATE SECTION === */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.hover-lift {
    transition: var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--box-shadow-lg);
}

/* === FAQ SECTION === */
.accordion-button {
    font-weight: 600;
    border-radius: 0.5rem !important;
}

.accordion-button:not(.collapsed) {
    background: var(--gradient-primary);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.125);
}

.accordion-item {
    border-radius: 0.5rem !important;
    overflow: hidden;
}

/* === FOOTER === */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.footer a:hover {
    color: white !important;
    transform: translateX(5px);
}

/* === COOKIE BANNER === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
    z-index: 9999;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* === LOADING SPINNER === */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

/* === TOOLTIPS === */
.tooltip {
    font-size: 0.875rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    #dcaChart {
        max-height: 300px;
    }
}

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

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

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

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

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

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

/* === UTILITY CLASSES === */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-success {
    background: var(--gradient-success) !important;
}

.bg-gradient-info {
    background: var(--gradient-info) !important;
}

.bg-gradient-warm {
    background: var(--gradient-warm) !important;
}

.bg-gradient-crypto {
    background: var(--gradient-crypto) !important;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* === PRINT STYLES === */
@media print {
    .navbar,
    .cookie-banner,
    .footer,
    #shareSection,
    #affiliate {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    body {
        color: #000;
    }
}
