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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #fff;
    min-height: 100vh;
}

/* Header Styles */
.main-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    color: #7c3aed;
    width: 28px;
    height: 28px;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-nav {
    display: flex;
    align-items: center;
}

.auth-buttons {
    display: flex;
    gap: 12px;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 64px);
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 64px);
    padding: 80px 24px 120px;
    text-align: center;
    background: linear-gradient(135deg, #fafbff 0%, #f0f4ff 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237c3aed' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    margin-bottom: 60px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.hero-badge i {
    width: 16px;
    height: 16px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #c7d2fe;
    border-radius: 20px;
    padding: 48px 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 520px;
    margin: 0 auto 48px;
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.1), transparent);
    transition: left 0.5s ease;
}

.upload-zone:hover {
    border-color: #7c3aed;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.1);
    transform: translateY(-2px);
}

.upload-zone:hover::before {
    left: 100%;
}

.upload-zone.drag-over {
    border-color: #7c3aed;
    background: #f3f0ff;
    border-style: solid;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.2);
}

.upload-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.upload-icon-container {
    margin-bottom: 16px;
}

.upload-icon {
    color: #7c3aed;
    width: 48px;
    height: 48px;
}

.upload-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.upload-content p {
    color: #6b7280;
    margin-bottom: 24px;
}

.choose-file-btn {
    background: none;
    border: none;
    color: #7c3aed;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    transition: color 0.2s ease;
}

.choose-file-btn:hover {
    color: #5b21b6;
}

.file-info {
    margin-top: 16px;
}

.supported-formats {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.supported-formats i {
    width: 16px;
    height: 16px;
}

.format-indicator {
    margin-top: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 16px;
    display: inline-block;
}

.format-indicator.pdf { 
    background: #fee2e2; 
    color: #dc2626; 
}
.format-indicator.docx { 
    background: #dbeafe; 
    color: #2563eb; 
}
.format-indicator.txt, .format-indicator.md { 
    background: #d1fae5; 
    color: #059669; 
}

.unsupported-notice {
    display: none;
    background: #fef3cd;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 16px;
    font-size: 0.875rem;
    align-items: center;
    gap: 8px;
}

.unsupported-notice.show {
    display: flex;
}

.warning-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.trust-item i {
    color: #7c3aed;
    width: 20px;
    height: 20px;
}

/* Container for sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Section Styles */
.section {
    padding: 80px 0;
    display: block;
}

.hidden {
    display: none !important;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.back-button {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s ease;
    font-weight: 500;
}

.back-button:hover {
    color: #7c3aed;
}

.back-button i {
    width: 20px;
    height: 20px;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.section-header p {
    font-size: 1.125rem;
    color: #6b7280;
}

/* Strategy Options */
.strategy-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.strategy-option {
    cursor: pointer;
}

.strategy-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.strategy-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.strategy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.strategy-card:hover {
    border-color: #7c3aed;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.1);
    transform: translateY(-4px);
}

.strategy-card:hover::before {
    transform: scaleX(1);
}

.strategy-option input[type="radio"]:checked + .strategy-card {
    border-color: #7c3aed;
    background: linear-gradient(135deg, #fafbff, #f0f4ff);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.15);
}

.strategy-option input[type="radio"]:checked + .strategy-card::before {
    transform: scaleX(1);
}

.strategy-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.strategy-icon {
    color: #7c3aed;
    margin-right: 12px;
    width: 24px;
    height: 24px;
}

.strategy-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.strategy-card p {
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.6;
}

.strategy-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #9ca3af;
    border-top: 1px solid #f3f4f6;
    padding-top: 16px;
}

.strategy-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.strategy-meta i {
    width: 14px;
    height: 14px;
}

/* Action Button */
.action-button {
    text-align: center;
}

.start-analysis-btn {
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
}

.start-analysis-btn:hover {
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
}

.start-analysis-btn i {
    width: 20px;
    height: 20px;
}

.start-analysis-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Full-screen Progress Section */
.progress-fullscreen {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #fafbff 0%, #f0f4ff 100%);
    z-index: 999;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.progress-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.progress-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.progress-header p {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 48px;
}

/* Circular Progress */
.progress-circle-container {
    margin-bottom: 48px;
}

.progress-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #7c3aed 0%, #3b82f6 100%);
    padding: 6px;
    margin: 0 auto;
    position: relative;
}

.progress-circle-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: #7c3aed;
    line-height: 1;
}

.progress-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    margin-top: 4px;
}

/* Processing Steps */
.processing-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.step.active {
    background: rgba(124, 58, 237, 0.1);
    border-color: #7c3aed;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.1);
}

.step.complete {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.step.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.step-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon i:first-child {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.step-check {
    position: absolute;
    width: 20px;
    height: 20px;
    color: #10b981;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.step.active .step-icon i:first-child {
    color: #7c3aed;
}

.step.complete .step-check {
    opacity: 1;
    transform: scale(1);
}

.step.complete .step-icon i:first-child {
    opacity: 0;
    transform: scale(0);
}

.step.error .step-icon i:first-child {
    color: #ef4444;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.processing-details {
    margin-bottom: 32px;
}

#processing-status {
    font-size: 1.125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.estimated-time {
    color: #6b7280;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.estimated-time i {
    width: 16px;
    height: 16px;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #9ca3af;
}

.cancel-btn i {
    width: 16px;
    height: 16px;
}

/* Full-screen Results Section */
.results-fullscreen {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 999;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 24px;
}

.results-container {
    max-width: 800px;
    margin: 0 auto;
}

.results-header {
    text-align: center;
    margin-bottom: 48px;
}

.results-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.results-header p {
    font-size: 1.125rem;
    color: #6b7280;
}

.risk-score-display {
    text-align: center;
    margin-bottom: 48px;
    padding: 40px;
    background: linear-gradient(135deg, #fafbff, #f0f4ff);
    border-radius: 20px;
    border: 1px solid #e0e7ff;
}

.risk-score {
    margin-bottom: 24px;
}

.score-circle {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 16px;
}

.score-number {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.score-max {
    font-size: 2rem;
    color: #6b7280;
    font-weight: 500;
}

.risk-level-badge {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.risk-score.low .score-number {
    color: #059669;
}

.risk-score.low .risk-level-badge {
    background: #d1fae5;
    color: #059669;
}

.risk-score.medium .score-number {
    color: #d97706;
}

.risk-score.medium .risk-level-badge {
    background: #fed7aa;
    color: #d97706;
}

.risk-score.high .score-number {
    color: #dc2626;
}

.risk-score.high .risk-level-badge {
    background: #fecaca;
    color: #dc2626;
}

.humorous-summary {
    background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: fit-content;
    overflow: visible;
}

.humorous-summary i {
    color: #7c3aed;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.humorous-summary p {
    font-size: 1.125rem;
    color: #5b21b6;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.primary-concerns {
    margin-bottom: 32px;
}

.primary-concerns h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-concerns h3 i {
    color: #f59e0b;
    width: 20px;
    height: 20px;
}

#concerns-list {
    list-style: none;
    padding: 0;
}

#concerns-list li {
    padding: 16px;
    border-left: 4px solid #f59e0b;
    background: #fef3c7;
    color: #92400e;
    margin-bottom: 8px;
    border-radius: 0 8px 8px 0;
    font-weight: 500;
}

#concerns-list li:last-child {
    margin-bottom: 0;
}

.detailed-breakdown {
    margin-bottom: 32px;
}

.detailed-breakdown h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.detailed-breakdown h3 > .title-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detailed-breakdown h3 i {
    color: #6366f1;
    width: 20px;
    height: 20px;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #d1d5db;
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #9ca3af;
}

.toggle-btn i {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.breakdown-content.show + .toggle-btn i {
    transform: rotate(180deg);
}

.breakdown-content {
    display: none;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
}

.breakdown-content.show {
    display: block;
}

.factor-item {
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.factor-item:last-child {
    border-bottom: none;
}

.factor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.factor-name {
    font-weight: 600;
    color: #111827;
}

.factor-score {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.factor-score.low {
    background: #d1fae5;
    color: #059669;
}

.factor-score.medium {
    background: #fed7aa;
    color: #d97706;
}

.factor-score.high {
    background: #fecaca;
    color: #dc2626;
}

.factor-explanation {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
}

.consensus-info {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.consensus-info i {
    color: #0369a1;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.confidence-level {
    color: #0369a1;
    font-size: 0.875rem;
    font-weight: 500;
}

.cta-container {
    text-align: center;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-btn {
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
}

.primary-btn:hover {
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
}

.primary-btn i {
    width: 16px;
    height: 16px;
}

.secondary-btn {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.secondary-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.secondary-btn i {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .upload-zone {
        padding: 32px 16px;
        margin-bottom: 32px;
    }
    
    .strategy-options {
        grid-template-columns: 1fr;
    }
    
    .processing-steps {
        grid-template-columns: 1fr;
    }
    
    .score-number {
        font-size: 3rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .primary-btn,
    .secondary-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .trust-indicators {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }
    
    .back-button {
        position: relative;
        margin-bottom: 16px;
    }
    
    .progress-fullscreen,
    .results-fullscreen {
        padding: 20px 16px;
    }

    .humorous-summary {
        padding: 20px;
        font-size: 1rem;
    }

    .humorous-summary p {
        font-size: 1rem;
    }

    .results-container {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .hero-section {
        padding: 60px 16px 80px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .progress-circle {
        width: 100px;
        height: 100px;
    }
    
    .progress-percentage {
        font-size: 1.25rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.choose-file-btn:focus,
.start-analysis-btn:focus,
.primary-btn:focus,
.secondary-btn:focus,
.toggle-btn:focus,
.cancel-btn:focus,
.back-button:focus {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

.upload-zone:focus-within {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* Authentication Styles */
.auth-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-section.hidden {
    display: none;
}

.auth-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.auth-button.logout-button {
    background: #dc2626;
}

.auth-button.logout-button:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.user-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.token-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f3f0ff, #ede9fe);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: #7c3aed;
    font-size: 0.875rem;
    border: 1px solid #c7d2fe;
}

.token-display i {
    width: 16px;
    height: 16px;
    color: #fbbf24;
}

/* User Avatar Styles */
.user-avatar-container {
    position: relative;
}

.user-avatar-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    overflow: hidden;
}

.user-avatar-button:hover {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-default {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

/* User Dropdown Styles */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dropdown-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-avatar-default {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

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

.dropdown-name {
    display: block;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
    line-height: 1.2;
}

.dropdown-email {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.2;
    margin-top: 2px;
    word-break: break-all;
}

.dropdown-menu {
    padding: 8px;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: none;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.dropdown-item:hover {
    background: #f9fafb;
    color: #7c3aed;
}

.dropdown-item i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Strategy Pricing */
.strategy-price {
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: auto;
}

.strategy-price.free {
    background: linear-gradient(135deg, #10b981, #059669);
}

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

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal.hidden .modal-content {
    transform: scale(0.95);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    color: #6b7280;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-close i {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 32px;
}

/* Sign Up Modal */
.signup-incentive {
    text-align: center;
    margin-bottom: 32px;
}

.incentive-icon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.incentive-icon i {
    width: 32px;
    height: 32px;
    color: white;
}

.signup-incentive p {
    margin-bottom: 8px;
    color: #374151;
}

.signup-incentive p:first-of-type {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

/* Top Up Modal */
.topup-info {
    text-align: center;
    margin-bottom: 32px;
}

.current-balance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f3f0ff;
    padding: 12px 20px;
    border-radius: 12px;
    margin-top: 16px;
    color: #7c3aed;
    font-weight: 600;
}

.current-balance i {
    width: 20px;
    height: 20px;
    color: #fbbf24;
}

.topup-options {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.topup-option {
    display: block;
    cursor: pointer;
}

.topup-option input[type="radio"] {
    display: none;
}

.topup-card {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.topup-card:hover {
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.1);
}

.topup-option input[type="radio"]:checked + .topup-card {
    border-color: #7c3aed;
    background: linear-gradient(135deg, #fafbff, #f3f0ff);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.15);
}

.topup-card.popular {
    border-color: #7c3aed;
    background: linear-gradient(135deg, #fafbff, #f3f0ff);
    position: relative;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.topup-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
}

.topup-tokens {
    font-size: 1.125rem;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 12px;
}

.topup-analyses {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

.modal-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Responsive adjustments for modals */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .modal-header, .modal-body {
        padding: 24px;
    }
    
    .topup-options {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
} 