/* ==========================================
   Component Styles - Enhanced & Polished
   ========================================== */

/* ========== Navigation ========== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    padding: var(--space-4) 0;
    transition: all var(--transition-smooth);
}

.nav.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.nav__logo {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition-smooth);
    position: relative;
}

.nav__logo::before {
    content: '✨';
    position: absolute;
    left: -28px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all var(--transition-smooth);
}

.nav__logo:hover {
    color: var(--primary-500);
}

.nav__logo:hover::before {
    opacity: 1;
    left: -32px;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav__link {
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-smooth);
    position: relative;
    padding: var(--space-2) 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-hero-1);
    border-radius: 2px;
    transition: all var(--transition-smooth);
    transform: translateX(-50%);
}

.nav__link:hover,
.nav__link.active {
    color: var(--primary-500);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Mobile Menu Toggle - Enhanced */
.nav__menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--neu-shadow), var(--neu-shadow-invert);
    border: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.nav__menu-toggle:hover {
    box-shadow: var(--neu-shadow-hover);
}

.nav__menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition-smooth);
}

.nav__menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav__menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav__menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========== Theme Toggle - Enhanced ========== */

.theme-toggle {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-full);
    box-shadow: var(--neu-shadow), var(--neu-shadow-invert);
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: none;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-hero-1);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    border-radius: inherit;
}

.theme-toggle:hover {
    box-shadow: var(--neu-shadow-hover);
}

.theme-toggle:hover::before {
    opacity: 0.1;
}

.theme-toggle:active {
    box-shadow: var(--neu-shadow-pressed);
    transform: scale(0.95);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    color: var(--text);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 1;
}

.theme-toggle .sun-icon {
    position: absolute;
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

.theme-toggle .moon-icon {
    position: absolute;
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
    color: #fbbf24;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

/* ========== Footer - Enhanced ========== */

.footer {
    background: var(--bg-secondary);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--primary-400) 50%,
            transparent 100%);
    opacity: 0.3;
}

.footer__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    position: relative;
}

.footer__main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-12);
    margin-bottom: var(--space-10);
}

.footer__brand {
    max-width: 320px;
}

.footer__logo {
    font-family: var(--font-display);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.footer__logo::before {
    content: '💭';
    font-size: 1.5rem;
}

.footer__tagline {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

.footer__links-group {
    display: flex;
    gap: var(--space-16);
}

.footer__links-section h4 {
    font-family: var(--font-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-5);
    position: relative;
}

.footer__links-section h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--gradient-hero-1);
    border-radius: 2px;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer__link {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    transition: all var(--transition-smooth);
    position: relative;
    padding-left: 0;
}

.footer__link:hover {
    color: var(--primary-500);
    padding-left: var(--space-2);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-6);
    border-top: 1px solid rgba(128, 128, 128, 0.1);
}

.footer__copyright {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.footer__social {
    display: flex;
    gap: var(--space-3);
}

.footer__social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-full);
    box-shadow: var(--neu-shadow), var(--neu-shadow-invert);
    color: var(--text-muted);
    transition: all var(--transition-smooth);
}

.footer__social-link:hover {
    color: white;
    background: var(--gradient-hero-1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-4px);
}

.footer__social-link svg {
    width: 18px;
    height: 18px;
}

/* ========== Success/Error Messages - Enhanced ========== */

.message {
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.message-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
}

.message-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.message-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

/* ========== Form Styles - Enhanced ========== */

.form-group {
    margin-bottom: var(--space-5);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-error {
    color: #ef4444;
    font-size: var(--font-size-xs);
    margin-top: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.char-counter {
    text-align: right;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--space-2);
    transition: color var(--transition-fast);
}

.input-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-2);
}

/* Label Icons */
.label-icon {
    margin-right: var(--space-1);
}

/* Modal description */
.modal-description {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--primary-500);
}

/* Submission note */
.submission-note {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: rgba(102, 126, 234, 0.08);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--space-4);
}

.note-icon {
    flex-shrink: 0;
}

/* ========== Empty State - Enhanced ========== */

.empty-state {
    text-align: center;
    padding: var(--space-20) var(--space-6);
}

.empty-state__icon {
    font-size: 5rem;
    margin-bottom: var(--space-6);
    opacity: 0.6;
    animation: float 4s ease-in-out infinite;
}

.empty-state__title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-3);
    color: var(--text);
}

.empty-state__description {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
    line-height: var(--line-height-relaxed);
}

/* ========== Badge - Enhanced ========== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--primary-500);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.badge-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.15));
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.15));
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

/* ========== Feedback Button - Enhanced ========== */

.feedback-btn {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-sticky);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero-1);
    border-radius: var(--radius-full);
    box-shadow:
        0 4px 20px rgba(102, 126, 234, 0.4),
        0 0 0 0 rgba(102, 126, 234, 0.4);
    color: white;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: none;
    animation: pulse 3s ease-in-out infinite;
}

.feedback-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow:
        0 8px 30px rgba(102, 126, 234, 0.5),
        0 0 0 8px rgba(102, 126, 234, 0.1);
    animation: none;
}

.feedback-btn:active {
    transform: scale(0.95);
}

.feedback-btn svg {
    width: 26px;
    height: 26px;
}

/* ========== Scroll to Top - Enhanced ========== */

.scroll-top-btn {
    position: fixed;
    bottom: var(--space-6);
    right: calc(var(--space-6) + 76px);
    z-index: var(--z-sticky);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-full);
    box-shadow: var(--neu-shadow), var(--neu-shadow-invert);
    color: var(--text);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-smooth);
    border: none;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--neu-shadow-hover);
    color: var(--primary-500);
}

.scroll-top-btn:active {
    transform: scale(0.95);
}

.scroll-top-btn svg {
    width: 20px;
    height: 20px;
}

/* ========== Decorative quote marks ========== */

.quote-mark {
    font-family: Georgia, serif;
    font-size: 6rem;
    line-height: 1;
    color: var(--primary-400);
    opacity: 0.2;
    position: absolute;
}

.quote-mark--open {
    top: -20px;
    left: -10px;
}

.quote-mark--close {
    bottom: -40px;
    right: -10px;
    transform: rotate(180deg);
}

/* ========== Gradient text ========== */

.gradient-text {
    background: var(--gradient-hero-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== Glowing border effect ========== */

.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-hero-1);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-smooth);
    filter: blur(8px);
}

.glow-border:hover::before {
    opacity: 0.6;
}