:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #64748b;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(226, 232, 240, 0.1);
    --success: #22c55e;
    --danger: #ef4444;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
    display: none;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Global Actions Toggle (for secondary menus) */
.actions-toggle {
    display: none;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.actions-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.actions-toggle.active .bar:nth-child(1) {
    -webkit-transform: translateY(9px) rotate(45deg);
    transform: translateY(9px) rotate(45deg);
}

.actions-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.actions-toggle.active .bar:nth-child(3) {
    -webkit-transform: translateY(-9px) rotate(-45deg);
    transform: translateY(-9px) rotate(-45deg);
}

.menu-toggle.active .bar:nth-child(1) {
    -webkit-transform: translateY(9px) rotate(45deg);
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    -webkit-transform: translateY(-9px) rotate(-45deg);
    transform: translateY(-9px) rotate(-45deg);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(79, 70, 229, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.auth-container {
    max-width: 450px;
    margin: 4rem auto;
    width: 100%;
}

@media (max-width: 768px) {
    .auth-container {
        margin: 2rem auto;
        padding: 0 1rem;
    }
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.875rem;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9375rem;
}

.nav-link:hover {
    color: var(--text-main);
}

h1,
h2,
h3 {
    letter-spacing: -0.025em;
    color: var(--text-main);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {

    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
    }

    .nav-content {
        padding: 0 1rem;
    }

    .menu-toggle {
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-justify-content: space-between;
        justify-content: space-between;
    }

    .actions-toggle {
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-justify-content: space-between;
        justify-content: space-between;
    }

    .actions.active {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links .btn {
        width: 100%;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-size: 0.875rem;
    transition: all 0.2s;
    outline: none;
}

input:focus,
textarea:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: white;
    border-radius: 0.75rem;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.google-btn:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.divider::before {
    margin-right: 1rem;
}

.divider::after {
    margin-left: 1rem;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Password Visibility Toggle */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 2.5rem;
    /* Make space for the eye icon */
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Thought Specific Styles */
.thought-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.thought-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.thought-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.thought-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    color: var(--primary);
}

.thought-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.vote-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    font-weight: 700;
}

.voting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

@media (max-width: 640px) {
    .voting-grid {
        grid-template-columns: 1fr;
    }
}

.thought-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.form-card {
    max-width: 600px;
    margin: 2rem auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* Thought Cards Styles */
.thought-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .thought-cards-grid {
        grid-template-columns: 1fr;
    }
}

.thought-card-item {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.thought-card-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.card-tags-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag-pill {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    color: #a5b4fc;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag-pill-link:hover .tag-pill {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    border-color: var(--primary);
    transform: translateY(-1px);
    color: white;
}

.tag-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.card-verses-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
}

.verse-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.verse-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.verse-item:first-child {
    padding-top: 0;
}

.verse-text {
    font-size: 0.9375rem;
    color: var(--text-main);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.verse-comments {
    margin-left: 1rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--primary);
    margin-top: 0.75rem;
}

.comment-item {
    padding: 0.5rem 0;
}

.comment-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--secondary);
}

.vote-badge-small {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    font-weight: 600;
}