/* CSS Variables & Theme Definitions */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --info-color: #3b82f6;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    
    --border-radius-sm: 0.5rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --transition-speed: 0.3s;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-hover);
}

/* Hero Section Styles */
.hero-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e1b4b 50%, #312e81 100%);
    padding-top: 100px; /* Offset for absolute nav */
}

/* Background Animated Blobs */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: drift 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -10%;
    left: -10%;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary-color);
    bottom: -20%;
    right: -10%;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    top: 30%;
    left: 40%;
    border-radius: 50%;
    opacity: 0.3;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(30px, -50px) rotate(10deg) scale(1.05); }
    66% { transform: translate(-20px, 20px) rotate(-5deg) scale(0.95); }
    100% { transform: translate(40px, 40px) rotate(15deg) scale(1.1); }
}

/* Utilities */
.backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hover-white:hover {
    color: white !important;
}

.tracking-wide {
    letter-spacing: 0.05em;
}

.tracking-wider {
    letter-spacing: 0.1em;
}

.transition-all {
    transition: all var(--transition-speed) ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl) !important;
}

.line-height-0 {
    line-height: 0;
}

.shrink-0 {
    flex-shrink: 0;
}

/* Components */
.btn-premium {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    transition: all var(--transition-speed);
}

.btn-premium:hover, .btn-premium:focus {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary-color);
}

.badge-premium {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.bg-gradient-premium {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Input Fields */
.url-input-group {
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    background: white;
    padding: 0.25rem;
}

.url-input-group input:focus {
    box-shadow: none;
}

.url-input-group .btn {
    border-radius: var(--border-radius-lg) !important; /* Force override bootstrap */
}

.url-input-group .input-group-text {
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
}

/* Result Box Animations */
.fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

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

.decor-line {
    transition: height 0.3s ease;
}

.result-box:hover .decor-line {
    height: 100% !important;
}

/* Features Component */
.feature-card {
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.icon-box {
    transition: transform var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
}

/* Accordion Customization */
.accordion-button:not(.collapsed) {
    background-color: #f1f5f9;
    color: var(--primary-color);
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

.accordion-button:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
}

.accordion-button::after {
    transition: transform var(--transition-speed) ease-in-out;
}

/* Footer Links */
.footer-links a {
    display: inline-block;
    position: relative;
    padding-bottom: 2px;
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: white;
    transition: width var(--transition-speed) ease;
}

.footer-links a:hover::after {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .url-input-group {
        flex-direction: column;
        border-radius: var(--border-radius-md);
        background: transparent;
        padding: 0;
    }
    
    .url-input-group .input-group-text {
        display: none;
    }
    
    .url-input-group input {
        border-radius: var(--border-radius-md) !important;
        margin-bottom: 0.5rem;
        padding-left: 1rem !important;
        background: white;
    }
    
    .url-input-group .btn {
        border-radius: var(--border-radius-md) !important;
        width: 100%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}
