/* Custom CSS for Botina Homepage */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #374151;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in.delay-1 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.animate-fade-in.delay-2 {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

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

/* Hero Section */
.hero-section {
    min-height: 100vh;
    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><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Bot Illustration */
.bot-illustration {
    position: relative;
    padding: 3rem;
}

.bot-circle {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.bot-circle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: rotate 8s linear infinite;
}

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

.bot-circle i {
    position: relative;
    z-index: 2;
    color: white;
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.icon-float {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    box-shadow: var(--shadow-medium);
    animation: float 4s ease-in-out infinite;
}

.icon-float.icon-1 {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.icon-float.icon-2 {
    bottom: 30%;
    left: 5%;
    animation-delay: 1s;
}

.icon-float.icon-3 {
    top: 10%;
    left: 20%;
    animation-delay: 2s;
}

.icon-float.icon-4 {
    bottom: 10%;
    right: 25%;
    animation-delay: 3s;
}

/* Feature Cards */
.feature-card {
    background: white;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-large);
    border-color: var(--primary-color);
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Step Cards */
.step-card {
    background: white;
    border-radius: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

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

.step-number {
    margin-bottom: 1.5rem;
}

.code-example {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    border-radius: 0.5rem;
}

/* Command Items */
.command-item {
    background: white;
    transition: all 0.3s ease;
}

.command-item:hover {
    background: #f8fafc;
    border-color: var(--primary-color) !important;
    transform: translateX(10px);
}

/* Stats Section */
.stat-item {
    position: relative;
}

.stat-item h3 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(37, 99, 235, 0.95) !important;
    box-shadow: var(--shadow-soft);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-soft);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.rounded-pill {
    border-radius: 50px !important;
}

/* Footer */
footer {
    background: var(--dark-color) !important;
}

footer a {
    transition: color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }

    .bot-circle {
        width: 150px;
        height: 150px;
    }

    .icon-float {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 1rem 0;
    }

    .bot-illustration {
        padding: 1.5rem;
    }

    .floating-icons {
        display: none;
    }

    .step-card,
    .feature-card {
        margin-bottom: 1rem;
    }
}

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

/* Loading Animation */
.loading {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.loaded {
    opacity: 1;
}

/* Registration Form Styles */
.registration-card {
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.registration-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-control.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='%23198754' d='m2.3 6.73.8-.77-.76-.77-.76.77-.8.77.8.77zm1.96-4.47h-.79l-.79 2.38-.79-2.38h-.79l1.12 3.17h.92l1.12-3.17z'/></svg>");
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'><circle cx='6' cy='6' r='4.5'/><path d='m5.8 4.6 2.4 2.8m0-2.4-2.4 2.8'/></svg>");
}

.input-group .btn {
    border-color: #ced4da;
}

.input-group .form-control:focus + .btn {
    border-color: var(--primary-color);
}

.alert {
    border: none;
    border-radius: 0.75rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.1) 0%, rgba(25, 135, 84, 0.05) 100%);
    color: #0f5132;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    color: #842029;
}

.alert-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.1) 0%, rgba(13, 202, 240, 0.05) 100%);
    color: #055160;
}

/* Form Labels */
.form-label {
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-text {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    position: relative;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Messages */
.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

.alert .alert-heading {
    color: inherit;
    font-weight: 600;
}

/* Account Form Styling */
.account-card .form-field-wrapper input[type="text"],
.account-card .form-field-wrapper input[type="email"],
.account-card .form-field-wrapper input[type="password"],
.form-field-wrapper input[type="text"],
.form-field-wrapper input[type="email"],
.form-field-wrapper input[type="password"] {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 1.25rem !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
    appearance: none !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.account-card .form-field-wrapper input:focus,
.form-field-wrapper input:focus {
    color: #212529 !important;
    background-color: #fff !important;
    border-color: var(--primary-color) !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25) !important;
}

.account-card .form-field-wrapper input:invalid,
.form-field-wrapper input:invalid {
    border-color: var(--danger-color) !important;
}

.account-card .form-field-wrapper input:valid,
.form-field-wrapper input:valid {
    border-color: var(--success-color) !important;
}

/* Django Form Widget Overrides */
.account-card input[type="text"]:not(.form-control),
.account-card input[type="email"]:not(.form-control),
.account-card input[type="password"]:not(.form-control),
input[type="text"]:not(.form-control),
input[type="email"]:not(.form-control),
input[type="password"]:not(.form-control) {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 1.25rem !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
    appearance: none !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.account-card input[type="text"]:not(.form-control):focus,
.account-card input[type="email"]:not(.form-control):focus,
.account-card input[type="password"]:not(.form-control):focus,
input[type="text"]:not(.form-control):focus,
input[type="email"]:not(.form-control):focus,
input[type="password"]:not(.form-control):focus {
    border-color: var(--primary-color) !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25) !important;
}

.account-card input[type="checkbox"]:not(.form-check-input),
input[type="checkbox"]:not(.form-check-input) {
    width: auto !important;
    padding: 0 !important;
    margin-right: 0.5rem !important;
}

/* Specific Allauth Form Field Styling */
#id_email, #id_login, #id_password, #id_password1, #id_password2, #id_oldpassword {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 1.25rem !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
    appearance: none !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

#id_email:focus, #id_login:focus, #id_password:focus, #id_password1:focus, #id_password2:focus, #id_oldpassword:focus {
    border-color: var(--primary-color) !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25) !important;
}

#id_remember {
    width: auto !important;
    margin-right: 0.5rem !important;
}

/* Account Template Cards */
.account-card .card-header {
    border-bottom: none;
    font-weight: 600;
}

.account-card .card-body {
    padding: 2rem;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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