:root {
    --primary: #c1a35f;
    --primary-light: #d4bc82;
    --bg-dark: #0f1115;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.02em;
}

/* Background Image Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    transition: background-image 0.8s ease-in-out;
    background-attachment: fixed;
}

/* Dark overlay to ensure readability */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 17, 21, 0.7), rgba(15, 17, 21, 0.9));
    z-index: -1;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: pulse 10s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #3a2d59;
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #1a3a4a;
    bottom: -50px;
    left: -50px;
    animation-delay: -2s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #4a2a2a;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.2) translate(20px, 40px); }
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.screen.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Titles & Text */
.premium-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* Question Section */
.progress-container {
    width: 100%;
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    width: 20%;
    transition: width 0.6s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.question-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.question-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #fff;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: left;
}

.option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1.2rem 1.5rem;
    border-radius: 16px;
    color: var(--text-main);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateX(8px);
}

.option-btn .option-num {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    color: var(--primary);
}

.option-btn:hover .option-num {
    background: var(--primary);
    color: #000;
}

/* Results */
.result-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem;
    width: 100%;
    margin-top: 1rem;
}

.result-header {
    margin-bottom: 2rem;
}

.result-label {
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

.archetype-name {
    font-size: 3rem;
    color: #fff;
    margin-top: 0.5rem;
}

.result-body {
    text-align: left;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.influence-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.influence-section h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-family: inherit;
}

.primary-btn {
    background: var(--primary);
    color: #000;
}

.primary-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(193, 163, 95, 0.3);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid var(--glass-border);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

.link-btn {
    background: transparent;
    color: var(--text-muted);
    text-decoration: underline;
    margin-top: 2rem;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: #1a1d23;
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    position: relative;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

#email-form {
    margin-top: 2rem;
}

#email-form input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.status-msg {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* Footer */
.app-footer {
    margin-top: auto;
    padding: 2rem;
    font-size: 0.9rem;
}

.details-list {
    list-style: none;
    padding: 0;
}

.details-list li {
    margin-bottom: 1rem;
    padding-left: 0;
}

.detail-label {
    display: block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.detail-text {
    color: var(--text-main);
    display: block;
}

.hidden { display: none; }

/* PDF Export Styling (Screenshot Match) */
/* PDF Export Styling (Final Design: White Background, No Lines, Name Top) */
.pdf-export {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 20px !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 800px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

/* Удаляем псевдоэлементы (линии) */
.pdf-export::before,
.pdf-export::after {
    display: none !important;
    content: none !important;
}

.pdf-export .result-header {
    display: flex !important;
    flex-direction: column !important;
    border-bottom: 2px solid #c1a35f !important;
    padding-bottom: 20px !important;
    margin-bottom: 20px !important;
}

.pdf-export .result-label {
    color: #c1a35f !important;
    font-size: 1.2rem !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-bottom: 5px !important;
    order: 1 !important;
}

.pdf-export .archetype-name {
    color: #000000 !important;
    font-size: 3rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    order: 2 !important;
}

.pdf-export .result-body {
    padding-top: 0 !important;
    color: #000000 !important;
    order: 3 !important;
}

.pdf-export .details-list li {
    list-style-type: disc !important;
    margin-left: 20px !important;
    margin-bottom: 12px !important;
    color: #333333 !important;
}

.pdf-export .detail-label {
    color: #c1a35f !important;
    font-size: 1rem !important;
    display: inline !important;
    text-transform: none !important;
    font-weight: 600 !important;
}

.pdf-export .detail-text {
    color: #000000 !important;
    display: inline !important;
}

.pdf-export .actions {
    display: none !important;
}

@media (max-width: 600px) {
    .premium-title { font-size: 2.2rem; }
    .question-card, .result-card { padding: 1.5rem; }
    .actions { flex-direction: column; }
    .archetype-name { font-size: 2rem; }
}
