/* ============================================
   THISPLAYBOOK.APP - COMPONENT STYLES
   ============================================ */

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-4) 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.logo-img {
    height: 60px;
    width: auto;
}

.logo-text {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--white);
    letter-spacing: 0.05em;
}

.nav {
    display: flex;
    gap: var(--space-8);
}

.nav-link {
    color: var(--light-gray);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    text-decoration: none;
    transition: var(--transition-base);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    text-decoration: none;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: auto;
    padding: var(--space-16) 0 var(--space-8) 0;
    background: var(--dark-gray);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: var(--space-4);
}

.footer-tagline {
    color: var(--light-gray);
    font-size: var(--text-sm);
    font-style: italic;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
}

.footer-col h4 {
    color: var(--white);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
}

.footer-col a {
    display: block;
    color: var(--light-gray);
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
    transition: var(--transition-base);
}

.footer-col a:hover {
    color: var(--cyan-bright);
    text-decoration: none;
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--light-gray);
    font-size: var(--text-sm);
}

.footer-quote {
    color: var(--cyan-medium);
    font-style: italic;
}

/* ============================================
   MODAL
   ============================================ */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.modal-container.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-10);
    animation: scaleIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: none;
    border: none;
    color: var(--light-gray);
    font-size: var(--text-2xl);
    cursor: pointer;
    transition: var(--transition-base);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-6);
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.toast-success {
    border-color: var(--success);
}

.toast-error {
    border-color: var(--error);
}

.toast-info {
    border-color: var(--info);
}

/* ============================================
   BUILD CARDS
   ============================================ */
.build-card {
    padding: var(--space-6);
    cursor: pointer;
    transition: var(--transition-spring);
}

.build-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.build-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
}

.build-icon.explore {
    background: linear-gradient(135deg, var(--build-explore), #d063ea);
}

.build-icon.anchor {
    background: linear-gradient(135deg, var(--build-anchor), #2b7bd5);
}

.build-icon.connect {
    background: linear-gradient(135deg, var(--build-connect), #22c55e);
}

.build-icon.shift {
    background: linear-gradient(135deg, var(--build-shift), #ec4899);
}

.build-icon.move {
    background: linear-gradient(135deg, var(--build-move), #06b6d4);
}

.build-icon.build {
    background: linear-gradient(135deg, var(--build-build), #5eead4);
}

.build-icon.rest {
    background: linear-gradient(135deg, var(--build-rest), #fb7185);
}

.build-name {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-1);
}

.build-tagline {
    color: var(--light-gray);
    font-size: var(--text-sm);
}

.build-description {
    color: var(--light-gray);
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* ============================================
   PROGRESS COMPONENTS
   ============================================ */
.progress-bar {
    height: 8px;
    background: var(--medium-gray);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.5s ease-out;
}

.streak-display {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    background: rgba(255, 159, 28, 0.1);
    border: 1px solid rgba(255, 159, 28, 0.3);
    border-radius: var(--radius-md);
}

.streak-number {
    font-size: var(--text-3xl);
    font-weight: var(--weight-black);
    background: linear-gradient(135deg, #ff9f1c, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.streak-label {
    font-size: var(--text-sm);
    color: var(--light-gray);
}

/* ============================================
   OPTION CARDS (Onboarding)
   ============================================ */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-4);
}

.option-card {
    padding: var(--space-6);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-spring);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    border: 2px solid transparent;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
}

.option-card:hover {
    transform: translateY(-5px);
    border-color: var(--cyan-medium);
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.2);
}

.option-card.selected {
    border-color: var(--cyan-bright);
    background: rgba(0, 242, 254, 0.1);
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.3);
}

.option-emoji {
    font-size: 3rem;
}

.option-label {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
}

.option-time,
.option-description {
    font-size: var(--text-sm);
    color: var(--light-gray);
}

/* ============================================
   CHAT / CO-PILOT
   ============================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    max-width: 800px;
    margin: 0 auto;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.message {
    max-width: 80%;
    animation: slideUp 0.3s ease-out;
}

.message-user {
    align-self: flex-end;
    background: var(--gradient-primary);
    color: var(--white);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg);
}

.message-copilot {
    align-self: flex-start;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--white);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm);
}

.copilot-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    color: var(--cyan-medium);
}

.typing-indicator {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-4);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--cyan-medium);
    border-radius: 50%;
    animation: typing 1s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.chat-input-container {
    padding: var(--space-4);
    background: var(--dark-gray);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: var(--space-3);
}

.chat-input {
    flex: 1;
    padding: var(--space-4);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: var(--text-base);
}

.chat-input:focus {
    outline: none;
    border-color: var(--cyan-medium);
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.quick-reply {
    padding: var(--space-2) var(--space-4);
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid var(--cyan-dark);
    border-radius: var(--radius-full);
    color: var(--cyan-bright);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition-base);
}

.quick-reply:hover {
    background: rgba(0, 242, 254, 0.2);
}

/* ============================================
   COMMUNITY POST CARDS
   ============================================ */
.post-card {
    padding: var(--space-6);
    margin-bottom: var(--space-4);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.post-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--weight-bold);
}

.author-name {
    font-weight: var(--weight-semibold);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--light-gray);
}

.build-badge {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
}

.build-badge[data-build="EXPLORE"] {
    background: var(--build-explore);
    color: var(--black);
}

.build-badge[data-build="ANCHOR"] {
    background: var(--build-anchor);
    color: var(--black);
}

.build-badge[data-build="CONNECT"] {
    background: var(--build-connect);
    color: var(--black);
}

.build-badge[data-build="SHIFT"] {
    background: var(--build-shift);
    color: var(--black);
}

.build-badge[data-build="MOVE"] {
    background: var(--build-move);
    color: var(--black);
}

.build-badge[data-build="BUILD"] {
    background: var(--build-build);
    color: var(--black);
}

.build-badge[data-build="REST"] {
    background: var(--build-rest);
    color: var(--black);
}

.post-content {
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: 1px solid var(--glass-border);
}

.reactions {
    display: flex;
    gap: var(--space-4);
}

.reaction-button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: none;
    border: none;
    color: var(--light-gray);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition-base);
}

.reaction-button:hover {
    color: var(--white);
}

.reaction-button.reacted {
    color: var(--cyan-bright);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--medium-gray);
    border-top-color: var(--cyan-bright);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .chat-container {
        height: calc(100vh - 160px);
    }

    .message {
        max-width: 90%;
    }
}