/* =============================================================================
   Sexual Profile Scorer - Web Interface Styles
   ============================================================================= */

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;

    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.center {
    text-align: center;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header .subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* Index Header s logem */
.index-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

.index-logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.index-logo-img {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.index-brand {
    text-align: left;
}

.index-brand h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 0.25rem 0;
    letter-spacing: -1px;
}

.index-brand .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .index-logo {
        flex-direction: column;
        gap: 1rem;
    }

    .index-brand {
        text-align: center;
    }

    .index-brand h1 {
        font-size: 2.25rem;
    }

    .index-brand .subtitle {
        font-size: 1rem;
    }

    .index-logo-img {
        width: 4rem;
        height: 4rem;
    }
}

/* Info Box */
.info-box {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.info-box h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.info-box p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-secondary {
    background: #e5e7eb;
    color: var(--text-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.25rem;
    margin-top: 2rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress Bar */
.progress-bar {
    background: #e5e7eb;
    border-radius: 9999px;
    height: 12px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
    width: 0%;
}

#progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Question Card */
.question-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.question-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.question-card .question-text {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.question-card .question-help {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Answer Options */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.answer-option {
    background: var(--bg-color);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-option:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.answer-option.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

.answer-option input[type="radio"] {
    margin-right: 0.75rem;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

/* Loading Spinner */
.spinner {
    width: 60px;
    height: 60px;
    margin: 2rem auto;
    border: 6px solid #e5e7eb;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results */
#results-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 70vh;
    overflow-y: auto;
}

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

/* Error Screen */
#error-message {
    font-size: 1.25rem;
    color: var(--danger-color);
    margin: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .navigation {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.modal-content .form-group {
    margin-bottom: 1.5rem;
}

.modal-content label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.modal-content input[type="password"],
.modal-content input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-content .actions {
    margin-top: 2rem;
}

/* =============================================================================
   AVATARY - Online uživatelé a aktivní uživatelé
   ============================================================================= */

.online-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #10b981;
    flex-shrink: 0;
}

.online-user-avatar-fallback {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 16px !important;
    flex-shrink: 0;
}

.online-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.online-user-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* Chat avatary */
.chat-online-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #10b981;
    flex-shrink: 0;
}

.chat-online-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

/* =============================================================================
   Online Status Indicator
   ============================================================================= */

.avatar-wrapper {
    position: relative;
    display: inline-block;
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: var(--success-color);
    border: 2px solid var(--card-bg);
    border-radius: 50%;
    display: none;
}

.online-indicator.online {
    display: block;
}

/* Velikosti pro různé kontexty */
.avatar-wrapper.small .online-indicator {
    width: 8px;
    height: 8px;
    border-width: 1.5px;
}

.avatar-wrapper.large .online-indicator {
    width: 16px;
    height: 16px;
    border-width: 3px;
}

/* =============================================================================
   Glossary Tooltips - vysvětlení BDSM termínů v reportu (Wikipedia styl)
   ============================================================================= */

.glossary-term {
    cursor: help;
    border-bottom: 1px dashed currentColor;
    transition: background 0.2s ease;
}

.glossary-term:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Report content styling pro tooltipy */
.report-content .glossary-term {
    font-weight: 500;
}

/* Floating tooltip je vytvořen JavaScriptem, ale přidáme fallback styly */
.glossary-floating-tooltip {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =============================================================================
   REKLAMNÍ SLOTY (Ad Slots)
   ============================================================================= */

/* Základní wrapper pro všechny reklamy */
.ad-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--space-md) 0;
    padding: var(--space-sm);
    min-height: 50px;
}

/* Prázdný slot se nezobrazuje */
.ad-slot:empty {
    display: none;
    margin: 0;
    padding: 0;
    min-height: 0;
}

/* Globální pozice - pod navigací */
.ad-slot-layout_under_nav {
    background: linear-gradient(to bottom, rgba(0,0,0,0.02), transparent);
    padding: var(--space-md) var(--space-lg);
    margin: 0;
}

/* Globální pozice - nad patičkou */
.ad-slot-layout_footer {
    background: linear-gradient(to top, rgba(0,0,0,0.02), transparent);
    padding: var(--space-md) var(--space-lg);
    margin-top: var(--space-lg);
}

/* Dashboard pozice */
.ad-slot-dashboard_top {
    margin-bottom: var(--space-lg);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.ad-slot-dashboard_sidebar {
    margin-bottom: var(--space-md);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: var(--space-md);
}

/* Blog pozice */
.ad-slot-blog_list_top,
.ad-slot-blog_detail_after {
    margin: var(--space-lg) 0;
    border-radius: var(--border-radius);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: var(--space-md);
}

/* Fórum pozice */
.ad-slot-forum_top {
    margin: var(--space-lg) 0;
    border-radius: var(--border-radius);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.ad-slot-forum_topic_between {
    margin: var(--space-md) 0;
    padding: var(--space-md);
    background: rgba(99, 102, 241, 0.03);
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
}

/* Seznamka pozice */
.ad-slot-dating_top {
    margin: var(--space-lg) 0;
    border-radius: var(--border-radius);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

/* Žebříčky pozice */
.ad-slot-leaderboard_top {
    margin-bottom: var(--space-lg);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

/* Landing page */
.ad-slot-index_hero {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
}

/* Profil sidebar */
.ad-slot-profile_sidebar {
    margin-bottom: var(--space-md);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: var(--space-md);
}

/* Responzivní úpravy */
@media (max-width: 768px) {
    .ad-slot {
        padding: var(--space-xs);
    }

    .ad-slot-layout_under_nav,
    .ad-slot-layout_footer {
        padding: var(--space-sm);
    }

    /* Na mobilu skrýt některé méně důležité pozice */
    .ad-slot-dashboard_sidebar,
    .ad-slot-profile_sidebar {
        display: none;
    }
}

/* Dark mode úpravy */
@media (prefers-color-scheme: dark) {
    .ad-slot-layout_under_nav {
        background: linear-gradient(to bottom, rgba(255,255,255,0.02), transparent);
    }

    .ad-slot-layout_footer {
        background: linear-gradient(to top, rgba(255,255,255,0.02), transparent);
    }
}

/* =============================================================================
   Skyscraper reklamy po stranách stránky
   ============================================================================= */
.ad-slot.ad-slot-skyscraper_left,
.ad-slot.ad-slot-skyscraper_right {
    position: fixed !important;
    top: 120px !important;
    z-index: 1000 !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
    display: block !important;
}

.ad-slot.ad-slot-skyscraper_left {
    left: 10px !important;
    right: auto !important;
}

.ad-slot.ad-slot-skyscraper_right {
    right: 10px !important;
    left: auto !important;
}

/* Skrýt skyscrapery pokud není dostatek místa (< 1600px) */
@media (max-width: 1600px) {
    .ad-slot.ad-slot-skyscraper_left,
    .ad-slot.ad-slot-skyscraper_right {
        display: none !important;
    }
}
