/* Oracle Bot - Professional Modern Interface */

:root {
    /* Refined Color Palette */
    --primary-purple: #7C3AED;
    --secondary-purple: #6366F1;
    --accent-gold: #F59E0B;
    --deep-indigo: #4C1D95;
    --cosmic-blue: #1E40AF;

    /* Backgrounds */
    --bg-cosmic: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #1F2937 100%);
    --bg-card: rgba(30, 27, 75, 0.5);
    --bg-card-hover: rgba(99, 102, 241, 0.1);
    --bg-input: rgba(15, 23, 42, 0.7);

    /* Text */
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-accent: #FCD34D;

    /* Effects */
    --glow-primary: 0 0 15px rgba(124, 58, 237, 0.3);
    --glow-accent: 0 0 20px rgba(245, 158, 11, 0.4);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-cosmic);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(219, 39, 119, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: cosmicPulse 15s ease-in-out infinite;
    z-index: 0;
}

@keyframes cosmicPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Refined Header */
.header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    border-radius: 16px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.2);
    box-shadow: var(--shadow-card);
}

.oracle-logo {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: drop-shadow(var(--glow-primary));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.header h1 {
    font-size: 2.25rem;
    background: linear-gradient(135deg, #F59E0B 0%, #FCD34D 50%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-weight: 700;
}

.tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* Refined Sidebar */
.sidebar {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    height: fit-content;
    border: 1px solid rgba(124, 58, 237, 0.2);
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 20px;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section h3 {
    color: var(--accent-gold);
    margin-bottom: 16px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-section h3::before {
    content: '✨';
    font-size: 1.1rem;
}

.feature-list {
    list-style: none;
}

.feature-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    position: relative;
    font-size: 0.95rem;
}

.feature-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: var(--shadow-hover);
}

.feature-item.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(99, 102, 241, 0.3));
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-card);
}

.feature-item .icon {
    font-size: 1.25rem;
    min-width: 24px;
    text-align: center;
}

.command-list {
    list-style: none;
}

.command-list li {
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.command-list code {
    background: rgba(15, 23, 42, 0.8);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--accent-gold);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Premium User Info */
.user-info-top {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(99, 102, 241, 0.2));
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-tier {
    color: var(--accent-gold);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-edit,
.btn-logout {
    padding: 8px;
    background: rgba(124, 58, 237, 0.3);
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-edit:hover {
    background: rgba(124, 58, 237, 0.5);
    transform: scale(1.05);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.4);
    transform: scale(1.05);
}

/* Premium Features Badge */
.premium-features {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.premium-features h3 {
    color: var(--accent-gold);
    margin-bottom: 12px;
}

.premium-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 10px;
}

.premium-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

.premium-info {
    flex: 1;
}

.premium-title {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.premium-status {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Refined Chat Container */
.chat-container {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(124, 58, 237, 0.2);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    min-height: 700px;
}

/* Tab Content */
.tab-content {
    display: none;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.5s ease-in;
}

.tab-content.active {
    display: flex;
}

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

/* Chat Header with Status */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

.chat-header h2 {
    color: var(--accent-gold);
    font-size: 1.8rem;
    font-weight: 600;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #EF4444;
    animation: statusPulse 2s infinite;
}

.status-dot.connected {
    background: #10B981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}

/* Refined Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.message {
    margin-bottom: 16px;
    animation: messageSlide 0.3s ease-out;
}

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

.message-content {
    padding: 14px 18px;
    border-radius: 12px;
    max-width: 80%;
    position: relative;
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
}

.user-message .message-content {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.5), rgba(99, 102, 241, 0.5));
    margin-left: auto;
    border: 1px solid rgba(124, 58, 237, 0.4);
}

.bot-message .message-content,
.ai-message .message-content {
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.4), rgba(30, 58, 138, 0.4));
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.message-content strong {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.message-content p {
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    margin: 0;
}

/* Refined Input Area */
.chat-input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1.5px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
    resize: vertical;
    min-height: 52px;
    max-height: 200px;
    line-height: 1.5;
}

.chat-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    background: rgba(15, 23, 42, 0.85);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

/* Refined Buttons */
.btn-send, .btn-primary {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-send:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
}

.btn-send:active, .btn-primary:active {
    transform: translateY(0);
}

.btn-small {
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.7), rgba(99, 102, 241, 0.7));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-small:hover {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    transform: translateY(-1px);
}

/* Dream Analysis Form */
.dream-form, .guidance-container, .journey-container {
    padding: 25px;
    animation: fadeIn 0.5s ease-in;
}

.dream-form h2, .guidance-container h2, .journey-container h2 {
    color: var(--accent-gold);
    font-size: 2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.description {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.dream-textarea {
    width: 100%;
    padding: 20px;
    background: var(--bg-input);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: inherit;
    resize: vertical;
    min-height: 200px;
    margin-bottom: 25px;
    outline: none;
    transition: all 0.3s;
}

.dream-textarea:focus {
    border-color: var(--secondary-purple);
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.4);
    background: rgba(15, 23, 42, 0.9);
}

/* Enhanced Result Cards */
.result-container {
    margin-top: 35px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.3), rgba(30, 58, 138, 0.3));
    border-radius: 20px;
    border: 2px solid rgba(139, 92, 246, 0.4);
    backdrop-filter: blur(10px);
    animation: resultReveal 0.6s ease-out;
}

@keyframes resultReveal {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-container h3 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-container h3::before {
    content: '✨';
}

.analysis-content, .guidance-content {
    line-height: 1.9;
    color: var(--text-primary);
    margin-bottom: 25px;
    white-space: pre-wrap;
    font-size: 1.05rem;
    padding: 20px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    border-left: 4px solid var(--accent-gold);
}

/* Stats Grid */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.stat-item {
    background: rgba(15, 23, 42, 0.6);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: var(--accent-gold);
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Journey Display */
.journey-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.journey-card {
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.4), rgba(30, 58, 138, 0.4));
    padding: 30px;
    border-radius: 20px;
    border: 2px solid rgba(139, 92, 246, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.journey-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(147, 51, 234, 0.4);
}

.journey-card h3 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.journey-detail {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.journey-detail:last-child {
    border-bottom: none;
}

.journey-detail span {
    color: var(--text-secondary);
}

.journey-detail strong {
    color: var(--accent-gold);
    font-size: 1.1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(139, 92, 246, 0.2);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 30px;
    font-size: 1.3rem;
    color: var(--accent-gold);
    font-weight: 600;
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Resources Grid */
.resources-container {
    padding: 25px;
    animation: fadeIn 0.5s ease-in;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.resource-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(99, 102, 241, 0.1));
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.2);
    transition: all 0.3s;
    text-align: center;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-purple);
}

.resource-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px rgba(124, 58, 237, 0.3));
}

.resource-card h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.resource-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.btn-resource {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
}

.btn-resource:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 260px 1fr;
        gap: 20px;
    }

    .container {
        padding: 16px;
    }
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-bottom: 16px;
    }

    .header {
        padding: 24px 16px;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .oracle-logo {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .chat-container {
        min-height: 500px;
        padding: 16px;
    }

    .chat-messages {
        padding: 16px;
    }

    .message-content {
        max-width: 90%;
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .chat-input {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .btn-send, .btn-primary {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .journey-stats {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 12px;
    }

    .header {
        padding: 20px 12px;
        margin-bottom: 16px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .oracle-logo {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .main-content {
        gap: 12px;
        margin-bottom: 16px;
    }

    .sidebar {
        padding: 16px;
        border-radius: 12px;
    }

    .sidebar-section {
        margin-bottom: 16px;
    }

    .sidebar-section h3 {
        font-size: 0.9rem;
    }

    /* Mobile User Info - More Compact */
    .user-info-top {
        padding: 12px;
        gap: 10px;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .user-name {
        font-size: 0.9rem;
    }

    .user-tier {
        font-size: 0.7rem;
    }

    .user-actions {
        gap: 6px;
    }

    .btn-edit,
    .btn-logout {
        padding: 6px;
        min-width: 32px;
        font-size: 0.9rem;
    }

    .btn-text {
        display: none; /* Hide text labels on mobile, show only icons */
    }

    .btn-icon {
        display: inline;
    }

    .feature-item {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .feature-item .icon {
        font-size: 1.1rem;
    }

    .chat-container {
        min-height: 450px;
        padding: 12px;
        border-radius: 12px;
    }

    .chat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
        padding-bottom: 16px;
    }

    .chat-header h2 {
        font-size: 1.25rem;
    }

    .status-indicator {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .chat-messages {
        margin-bottom: 16px;
        padding: 12px;
    }

    .message-content {
        max-width: 95%;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .message-content strong {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    .chat-input-container {
        gap: 8px;
        flex-direction: column;
    }

    .chat-input {
        padding: 14px;
        font-size: 1rem;
        min-height: 80px;
    }

    .btn-send, .btn-primary {
        width: 100%;
        padding: 14px;
        font-size: 0.95rem;
    }

    .dream-textarea {
        min-height: 150px;
        font-size: 0.9rem;
    }
}

/* Modal System */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 14px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    padding: 0;
}

.modal-large {
    max-width: 750px;
}

.modal-large .modal-content {
    width: 95%;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.modal-header h3 {
    color: var(--accent-gold);
    font-size: 1.3rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(124, 58, 237, 0.2);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(124, 58, 237, 0.2);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1.5px solid rgba(124, 58, 237, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.modal-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(124, 58, 237, 0.2);
    color: var(--text-primary);
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(124, 58, 237, 0.3);
    transform: translateY(-1px);
}

/* Membership Info in Profile */
.membership-info {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(124, 58, 237, 0.2);
}

.membership-tier {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
}

.tier-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

.tier-name {
    color: var(--accent-gold);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.tier-price {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Upgrade Modal Styles */
.upgrade-hero {
    text-align: center;
    margin-bottom: 32px;
}

.upgrade-hero h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 12px;
}

.upgrade-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.pricing-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(99, 102, 241, 0.1));
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 32px;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.pricing-header h3 {
    color: var(--accent-gold);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price .amount {
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 700;
}

.price .period {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.features-list {
    list-style: none;
    margin-bottom: 32px;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--text-primary);
    font-size: 1rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.features-list li:last-child {
    border-bottom: none;
}

.check {
    color: var(--accent-gold);
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-upgrade {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-gold), #FCD34D);
    color: #0F172A;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.upgrade-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 16px;
    line-height: 1.6;
}

.secure-badge {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Premium Highlights */
.premium-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
}

.highlight-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    transition: all 0.2s;
}

.highlight-card:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
}

.highlight-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.highlight-text strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.highlight-text p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

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

/* Discord and Etsy Access Buttons */
.community-access,
.etsy-access {
    margin-top: 16px;
}

.discord-button,
.etsy-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(114, 137, 218, 0.15));
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.etsy-button {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.15));
    border-color: rgba(245, 158, 11, 0.3);
}

.discord-button:hover,
.etsy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.discord-button:hover {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.25), rgba(114, 137, 218, 0.25));
    border-color: rgba(88, 101, 242, 0.5);
}

.etsy-button:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(251, 191, 36, 0.25));
    border-color: rgba(245, 158, 11, 0.5);
}

.discord-icon,
.etsy-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.discord-info,
.etsy-info {
    flex: 1;
}

.discord-title,
.etsy-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.discord-subtitle,
.etsy-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.etsy-subtitle strong {
    color: var(--accent-gold);
    font-weight: 700;
}

.external-arrow {
    font-size: 1.2rem;
    opacity: 0.6;
    transition: all 0.2s;
}

.discord-button:hover .external-arrow,
.etsy-button:hover .external-arrow {
    transform: translateX(4px);
    opacity: 1;
}

/* Guidance Actions */
.guidance-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.btn-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: rgba(124, 58, 237, 0.2);
    color: var(--text-primary);
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary-link:hover {
    background: rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.external-icon {
    font-size: 1.1rem;
}

/* Touch-friendly enhancements for mobile */
@media (hover: none) and (pointer: coarse) {
    .feature-item:hover {
        transform: none;
    }

    .feature-item:active {
        transform: scale(0.98);
        background: var(--bg-card-hover);
    }

    .btn-send:hover, .btn-primary:hover, .btn-small:hover {
        transform: none;
    }

    .btn-send:active, .btn-primary:active, .btn-small:active {
        transform: scale(0.97);
    }
}

/* Profile Tab Styles */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-container h2 {
    color: var(--accent-gold);
    margin-bottom: 8px;
    text-align: center;
}

.profile-container .description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.profile-form {
    background: var(--bg-card);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 16px;
    padding: 32px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    background: var(--bg-input);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: var(--glow-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

.form-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.form-actions .btn-primary {
    min-width: 200px;
}

.profile-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.profile-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ADE80;
}

.profile-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #F87171;
}

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

    .profile-form {
        padding: 20px;
    }
}
