:root {
    --gold: #c39c5b;
    --gold-hover: #e0b46d;
    --bg-dark: #0a0a0a;
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --font-main: 'Montserrat', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --accent: #007aff;
    --accent-glow: rgba(0, 122, 255, 0.4);
    --card-bg: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('assets/images/background.png');
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.4) 0%, rgba(10, 10, 10, 0.9) 100%);
    z-index: -1;
}

/* Tab Header */
.tab-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 70px;
    z-index: 10;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
    flex: 1;
}

.tab-item.active {
    opacity: 1;
    color: var(--gold);
}

.tab-item.active .tab-icon {
    transform: scale(1.1);
}

.tab-icon {
    font-size: 20px;
}

.tab-text {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.tab-content {
    display: none;
    height: 100%;
    width: 100%;
    padding: 20px;
}

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

/* Quiz Styling */
.quiz-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quiz-step {
    display: none;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.quiz-step.active {
    display: flex;
    animation: fadeIn 0.4s ease;
}

.step-num {
    font-size: 12px;
    color: var(--gold);
    letter-spacing: 2px;
}

.quiz-step h2 {
    font-family: var(--font-serif);
    font-size: 32px;
    margin-bottom: 20px;
}

.options-grid {
    display: grid;
    gap: 15px;
}

.option-btn {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.option-btn:active {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(0.98);
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 20px;
    cursor: pointer;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* Chat Styling */
.chat-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 10px;
}

.message {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    backdrop-filter: blur(5px);
}

.message.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-bottom-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background: var(--gold);
    color: white;
    border-bottom-right-radius: 4px;
}

.message img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 8px;
    display: block;
}

.preview-container {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.preview-container img {
    height: 80px;
    border-radius: 8px;
}

#remove-preview {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff3b30;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    cursor: pointer;
}

/* Input Area */
.chat-input-area {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.input-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
    background: none;
    border: none;
}

.action-btn:active {
    transform: scale(1.2);
    opacity: 1;
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    outline: none;
}

.send-btn {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 20px;
    cursor: pointer;
}

/* Recording Overlay */
.voice-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.recording-animation {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 40px;
}

.recording-animation span {
    width: 4px;
    background: var(--gold);
    border-radius: 2px;
    animation: wave 1s infinite ease-in-out;
}

.recording-animation span:nth-child(1) {
    height: 10px;
    animation-delay: 0.1s;
}

.recording-animation span:nth-child(2) {
    height: 30px;
    animation-delay: 0.2s;
}

.recording-animation span:nth-child(3) {
    height: 40px;
    animation-delay: 0.3s;
}

.recording-animation span:nth-child(4) {
    height: 20px;
    animation-delay: 0.4s;
}

@keyframes wave {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(1.5);
    }
}

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

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

.btn-primary {
    background-color: var(--gold);
    color: #fff;
    padding: 14px 24px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

/* Loader */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: var(--gold);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}