:root {
    --primary-red: #d32f2f;
    --bright-red: #ff5252;
    --dark-bg: #0f172a;
    --darker-bg: #1e1b4b;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    background-attachment: fixed;
    color: #ffffff;
}

/* Typography Utilities */
.text-muted, .text-white-50 {
    color: rgba(255, 255, 255, 0.6) !important;
}
.text-dark {
    color: #ffffff !important;
}
.bg-light, .bg-white {
    background-color: transparent !important;
}
.bg-dark {
    background-color: rgba(0,0,0,0.3) !important;
}
.border, .border-secondary {
    border-color: var(--glass-border) !important;
}

/* Glass Navbar */
.navbar { background: #ffffff !important; backdrop-filter: none; border-bottom: 1px solid #dee2e6; }
.navbar-brand .text-dark {
    color: rgba(255,255,255,0.8) !important;
}
.nav-link { color: #333333 !important; font-weight: 600; transition: all 0.3s ease; }
.nav-link:hover, .nav-link.active {
    color: var(--bright-red) !important;
}

/* Buttons */
.btn-danger {
    background: linear-gradient(90deg, var(--primary-red), var(--bright-red));
    border: none;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
    color: white !important;
    transition: all 0.3s ease;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.6);
}
.btn-outline-danger {
    border: 1px solid var(--bright-red);
    color: var(--bright-red) !important;
    background: transparent;
    transition: all 0.3s ease;
}
.btn-outline-danger:hover {
    background: var(--bright-red);
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 82, 82, 0.4);
}

/* Hero Section */
.hero-section {
    height: 85vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
}
.hero-bg-overlay {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(211,47,47,0.15) 0%, rgba(0,0,0,0) 40%);
    animation: rotateBg 25s linear infinite;
    z-index: 0;
    pointer-events: none;
}
#three-canvas-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    pointer-events: none; 
}

/* Fancy Glass Cards */
.fancy-card, .card, .modal-content {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.fancy-card::after, .program-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), #ff8a65, var(--primary-red));
    background-size: 200% auto;
    transition: all 0.4s ease;
}

.fancy-card:hover, .program-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 45px rgba(211, 47, 47, 0.25) !important;
    z-index: 10;
}

.fancy-card:hover::after, .program-card:hover::after {
    height: 5px;
    animation: gradientMove 3s linear infinite;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes gradientMove {
    to { background-position: 200% center; }
}

/* Icons & Emojis Glowing Box */
.icon-glow, .bg-danger.bg-opacity-10 {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50% !important;
    background: linear-gradient(135deg, rgba(211,47,47,0.3) 0%, rgba(211,47,47,0.05) 100%) !important;
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(211, 47, 47, 0.5) !important;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.fancy-card:hover .icon-glow, .program-card:hover .bg-danger.bg-opacity-10 {
    transform: rotateY(180deg) scale(1.1);
    box-shadow: 0 0 30px rgba(211, 47, 47, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.2);
}
.icon-glow span, .bg-danger.bg-opacity-10 * {
    transition: all 0.4s ease;
}
.fancy-card:hover .icon-glow span, .program-card:hover .bg-danger.bg-opacity-10 * {
    transform: rotateY(-180deg);
}

/* Gradients for Text */
.text-gradient {
    background: linear-gradient(90deg, #ffffff, #ffcdd2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-danger {
    color: var(--bright-red) !important;
}
.bg-danger {
    background-color: var(--primary-red) !important;
}

/* Forms */
.form-control, .form-select {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
}
.form-control::placeholder {
    color: rgba(255,255,255,0.4);
}
.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,0.1) !important;
    border-color: var(--bright-red) !important;
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.3);
}
option {
    background: var(--dark-bg);
    color: white;
}

/* Modal specific overrides */
.modal-header {
    background: rgba(15, 23, 42, 0.8) !important;
    border-bottom: 1px solid var(--glass-border) !important;
}
.modal-body, .modal-footer {
    background: transparent !important;
}
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Generic Utilities */
.tracking-wider {
    letter-spacing: 0.1em;
}
html {
    scroll-behavior: smooth;
}

/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    z-index: 1050;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1rem;
    display: none;
    transform-origin: bottom right;
    animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-container.active {
    display: block;
}

@keyframes scaleUp {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.chat-message.user-message {
    text-align: right;
}

.chat-message.user-message > div {
    background: linear-gradient(90deg, var(--primary-red), var(--bright-red)) !important;
}

#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}
#chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
#chatbot-fab {
    transition: all 0.3s ease;
}
#chatbot-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.8) !important;
}
