@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=JetBrains+Mono:wght@600;800&display=swap');

:root, html[data-theme="light"] {
  --bg-base: #e0ebff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f4f7fc;

  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-muted: #b2bec3;

  --accent-primary: #6c5ce7;
  --accent-hover: #5a4bcf;
  --accent-secondary: #00b894;
  --accent-warm: #ff7675;
  
  --border-color: #dfe6e9;
  --border-radius-sm: 12px;
  --border-radius-md: 20px;
  --border-radius-lg: 32px;
  
  --shadow-soft: 0 12px 35px rgba(108, 92, 231, 0.15);
  --shadow-3d: 0 6px 0 rgba(223, 230, 233, 1);

  --font-family-base: 'Nunito', sans-serif;
  --font-family-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.header-left {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

header img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

header h1 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-primary);
}

#alert-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast-alert {
    background-color: #ffffff;
    color: #333333;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-alert.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-alert.alert-error {
    border-left: 4px solid var(--accent-warm);
}
.toast-alert.alert-error i {
    color: var(--accent-warm);
    font-size: 1.2rem;
}

.toast-alert.alert-success {
    border-left: 4px solid var(--accent-secondary);
}
.toast-alert.alert-success i {
    color: var(--accent-secondary);
    font-size: 1.2rem;
}

body {
  background: linear-gradient(135deg, #e0ebff 0%, #fef5e7 100%);
  
  background-attachment: fixed;
  background-size: cover;
  
  color: var(--text-primary);
  font-family: var(--font-family-base);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

h1, h2, h3 {
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.03em;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}
.normal {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}

footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

footer a.normal {
    color: var(--text-secondary);
    font-weight: 700;
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 1px;
    transition: all 0.2s ease;
}

footer a.normal:hover {
    color: var(--accent-primary);
    border-bottom-style: dotted;
    border-bottom-color: var(--accent-primary);
}

.footer-terms {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.footer-terms a {
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 1px;
    transition: all 0.2s ease;
}

.footer-terms a:hover {
    color: var(--accent-primary);
    border-bottom-style: dotted;
    border-bottom-color: var(--accent-primary);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(45, 52, 54, 0.6);
    backdrop-filter: blur(5px);
}
.modal.hidden { display: none !important; }

.modal-content {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 400px;
    border-top: 8px solid var(--accent-warm);
    position: relative;
    font-weight: 700;
}
.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}
.close-btn:hover { color: var(--accent-warm); }

#action-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-lg);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#action-loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.bouncing-dots {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.bouncing-dots div {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    animation: bounceDot 0.5s cubic-bezier(0.19, 0.57, 0.3, 0.98) infinite alternate;
}

.bouncing-dots div:nth-child(1) { background: var(--accent-primary); animation-delay: 0s; }
.bouncing-dots div:nth-child(2) { background: var(--accent-warm); animation-delay: 0.15s; }
.bouncing-dots div:nth-child(3) { background: var(--accent-secondary); animation-delay: 0.3s; }

@keyframes bounceDot {
    from { transform: translateY(0); }
    to { transform: translateY(-15px); }
}

#action-loading-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}