/* static/style.css */

:root {
  --brand: #a8c5dd;
  --text: #222;
  --muted: #6c757d;
  --bg: #ffffff;
}

html, body {
  height: 100%;
}

body {
  color: var(--text);
  background: var(--bg);
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* Headings with extra polish */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Buttons with rounded, friendly style */
.btn {
  font-weight: 600;
  border-radius: 12px;
  padding: 0.6rem 1.5rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Navbar branding */
.navbar-brand {
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 1px;
}

.navbar-brand span {
  font-size: 1.8rem;
}

/* Buttons */
.btn-primary {
  background-color: var(--brand);
  border-color: var(--brand);
}

/* Forms */
.form-group label {
  font-weight: 600;
}

.form-control {
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

.form-group-label {
  font-weight: 600;
}

/* Images */
img.img-fluid {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 16px;
  transition: transform 0.3s ease;
}

img.img-fluid:hover {
  transform: scale(1.02);
}

/* Progress bar text centering */
.progress {
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  font-weight: 600;
}

/* Lists within side panel */
.side-panel .list-unstyled {
  max-height: 40vh;
  overflow: auto;
}

/* Cards and panels */
.card {
  border-radius: 16px;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header {
  font-weight: 700;
  background-color: #f8f9fa;
  border-radius: 16px 16px 0 0 !important;
}

/* Vocabulary words styling */
.badge {
  font-weight: 600;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

/* Alert boxes */
.alert {
  border-radius: 12px;
  font-weight: 500;
}

/* Utility */
.mt-5 { margin-top: 3rem !important; }


/* ============================================
   CONTACT US FLOATING BUTTON & MODAL
   ============================================ */

/* Floating Contact Button */
/* Floating Contact Button */
.contact-fab {
    position: fixed;
    bottom: 100px; /* Above theme switcher */
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    color: #333;
    border: 3px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 998;
    animation: contactFabIntro 4s ease-in-out;
}

/* Colorful pulse animation on page load */
@keyframes contactFabIntro {
    0% {
        opacity: 0;
        transform: scale(0.8);
        border-color: #e0e0e0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    25% {
        opacity: 1;
        transform: scale(1);
        border-color: #4a90e2;
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.7), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    35% {
        transform: scale(1.15);
        border-color: #7b68ee;
        box-shadow: 0 0 0 8px rgba(123, 104, 238, 0), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    45% {
        transform: scale(1);
        border-color: #50c878;
        box-shadow: 0 0 0 0 rgba(80, 200, 120, 0.7), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    55% {
        transform: scale(1.1);
        border-color: #ff6b9d;
        box-shadow: 0 0 0 8px rgba(255, 107, 157, 0), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    65% {
        transform: scale(1);
        border-color: #ffa500;
        box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    75% {
        transform: scale(1.05);
        border-color: #4a90e2;
        box-shadow: 0 0 0 6px rgba(74, 144, 226, 0), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: scale(1);
        border-color: #e0e0e0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.contact-fab:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.contact-fab:active {
    transform: translateY(0) scale(0.95);
}

/* Contact Modal Overlay */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-modal.active {
    display: flex;
    opacity: 1;
}

/* Modal Content Card */
.contact-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    position: relative;
}

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

/* Close Button */
.contact-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
}

.contact-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

/* Modal Header */
.contact-modal-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.contact-modal-header h2 {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.contact-modal-header p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

/* Form Container */
.contact-form-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.contact-form-container iframe {
    display: block;
    width: 100%;
    border: none;
}

/* Quiz Sign-up Banner */
.signup-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 28px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: slideInDown 0.5s ease-out;
}

.signup-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
}

.signup-banner-icon {
    font-size: 2.5rem;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: starPulse 2s ease-in-out infinite;
}

.signup-banner-text {
    flex: 1;
}

.signup-banner h3 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
}

.signup-banner p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

.signup-banner-actions {
    flex-shrink: 0;
}

.signup-banner .btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.signup-banner .btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .signup-banner-content {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 16px;
    }

    .signup-banner-icon {
        font-size: 2rem;
    }

    .signup-banner h3 {
        font-size: 1.2rem;
    }

    .signup-banner p {
        font-size: 0.9rem;
    }

    .signup-banner .btn {
        width: 100%;
        padding: 12px 20px;
    }

    .contact-fab {
        bottom: 80px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .contact-modal-content {
        width: 95%;
        max-height: 85vh;
        border-radius: 12px;
    }

    .contact-modal-header {
        padding: 24px 20px 16px;
    }

    .contact-modal-header h2 {
        font-size: 1.5rem;
    }

    .contact-form-container {
        max-height: calc(85vh - 120px);
    }
}

/* Adjust for small screens */
@media (max-width: 480px) {
    .contact-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .contact-fab {
        bottom: 70px;
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}
