/* Modern Custom Styles for ReplyBuddy.ai */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --dark-glass-bg: rgba(0, 0, 0, 0.1);
    --dark-glass-border: rgba(255, 255, 255, 0.1);
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Navigation Dropdown Fix */
.navbar-nav .dropdown-menu {
    z-index: 1055 !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.navbar-nav .dropdown-menu .dropdown-item {
    color: #333;
    padding: 10px 16px;
    border-radius: 6px;
    margin: 2px 4px;
    transition: all 0.2s ease;
}

.navbar-nav .dropdown-menu .dropdown-item:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* Glass Morphism Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.hero-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    backdrop-filter: blur(20px);
    min-height: 90vh;
    display: flex;
    align-items: center;
    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 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" style="stop-color:white;stop-opacity:0.1"/><stop offset="100%" style="stop-color:white;stop-opacity:0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="80" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.features-section {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.05) 0%, rgba(0, 242, 254, 0.05) 100%);
    backdrop-filter: blur(10px);
    position: relative;
}

.cta-section {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
    backdrop-filter: blur(20px);
    position: relative;
}

.demo-conversation {
    background-color: var(--bs-gray-100);
    border-radius: 0.5rem;
    padding: 1rem;
}

.message {
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
}

.message.received {
    background-color: var(--bs-light);
    border-left: 4px solid var(--bs-info);
}

.message.sent {
    background-color: var(--bs-info);
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 4px solid var(--bs-primary);
}

/* Email list styling */
.list-group-item {
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    border-left-color: var(--bs-primary);
    background-color: var(--bs-primary);
    background-color: rgba(13, 110, 253, 0.05);
}

/* Modern Card Styles */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-body {
    position: relative;
    z-index: 1;
}

/* Modern Button Styles */
.btn {
    border-radius: 15px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::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 ease;
}

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

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 20px;
}

/* Modern Navbar Styles */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: white !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.navbar-nav .nav-link:hover {
    transform: translateY(-1px);
}

.dropdown-menu {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    color: white;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Progress bar styling */
.progress {
    height: 8px;
}

/* Badge styling */
.badge {
    font-size: 0.75em;
}

/* Modern Alert Styles */
.alert {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    border-left: 4px solid;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.alert-info {
    border-left-color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
}

.alert-success {
    border-left-color: #00f2fe;
    background: rgba(0, 242, 254, 0.1);
}

.alert-warning {
    border-left-color: #f093fb;
    background: rgba(240, 147, 251, 0.1);
}

.alert-danger {
    border-left-color: #f5576c;
    background: rgba(245, 87, 108, 0.1);
}

/* Modern Form Styles */
.form-control, .form-select {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    color: white;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-label {
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.form-check-input {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.form-check-input:checked {
    background: var(--primary-gradient);
    border-color: rgba(102, 126, 234, 0.5);
}

/* Table styling */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Spinner animation */
.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive design improvements */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
}

/* Modern Message Styles */
.demo-conversation {
    background: var(--dark-glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--dark-glass-border);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
}

.message {
    padding: 15px 20px;
    border-radius: 20px;
    margin: 15px 0;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.message.received {
    background: rgba(79, 172, 254, 0.2);
    border-left: 4px solid #4facfe;
    margin-left: 0;
    margin-right: 60px;
}

.message.sent {
    background: rgba(102, 126, 234, 0.2);
    border-left: 4px solid #667eea;
    margin-left: 60px;
    margin-right: 0;
}

.message:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Modern Typography */
.display-4 {
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.lead {
    font-size: 1.3rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: white;
    font-weight: 700;
}

.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Modern Icons */
.fa-3x {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

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

/* Additional Modern Styles */
.badge {
    background: var(--secondary-gradient);
    color: white;
    border-radius: 20px;
    padding: 5px 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress {
    height: 12px;
    background: var(--dark-glass-bg);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.progress-bar {
    background: var(--accent-gradient);
    box-shadow: 0 2px 10px rgba(79, 172, 254, 0.3);
}

.table {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    overflow: hidden;
    color: white;
}

.table-hover tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.list-group-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.15);
}

/* Footer Styles */
footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    color: white;
}

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

.animate-slide-up {
    animation: slideUp 0.8s ease-in-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* Custom scrollbar */
.card-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.card-body::-webkit-scrollbar {
    width: 6px;
}

.card-body::-webkit-scrollbar-track {
    background: transparent;
}

.card-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.card-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Step Indicator Styles */
.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dark-glass-bg);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
}

.step-indicator:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: calc(100vw / 4 - 60px);
    height: 2px;
    background: var(--glass-border);
    transform: translateY(-50%);
    z-index: -1;
}

.step-indicator.active {
    background: var(--primary-gradient);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

.step-indicator.completed {
    background: var(--accent-gradient);
    border-color: rgba(79, 172, 254, 0.5);
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.3);
}

.step-indicator.completed::after {
    background: var(--accent-gradient);
}

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

/* Email Configuration Specific Styles */
.config-step {
    min-height: 400px;
}

.provider-card {
    background: var(--dark-glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--dark-glass-border);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.form-select-lg {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 15px 20px;
    border-radius: 15px;
}

.form-select-lg:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    color: white;
}

.form-select-lg option {
    background: #2c3e50;
    color: white;
}

.card-header.bg-gradient {
    background: var(--primary-gradient) !important;
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .message.received {
        margin-right: 20px;
    }
    
    .message.sent {
        margin-left: 20px;
    }
    
    .card {
        margin-bottom: 20px;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .step-indicator {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .step-indicator:not(:last-child)::after {
        width: calc(100vw / 4 - 50px);
    }
    
    .config-step {
        min-height: 300px;
    }
}
