/* ===================================
   DomainAtoll.com Custom Styles
   Inspired by Claude.ai aesthetic
   =================================== */

/* CSS Variables */
:root {
    /* Light Mode Colors */
    --bg-primary: #faf9f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f4f2;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --text-tertiary: #999999;
    --border-color: #e5e3df;
    --accent-color: #1a1a1a;
    --accent-hover: #000000;
    --success-color: #059669;
    --warning-color: #d97706;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* Dark Mode Colors */
body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #252525;
    --bg-tertiary: #2d2d2d;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    --border-color: #3a3a3a;
    --accent-color: #f5f5f5;
    --accent-hover: #ffffff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-image {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

.theme-icon {
    display: none;
}

.light-mode .sun-icon {
    display: block;
}

.dark-mode .moon-icon {
    display: block;
}

/* Main Content */
.main-content {
    padding: 60px 0 120px;
    min-height: calc(100vh - 200px);
}

/* State Management */
.state {
    display: none;
}

.state.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 80px;
}

.hero-title {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

/* Key Input */
.key-input-container {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto 12px;
}

.key-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.key-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.dark-mode .key-input:focus {
    box-shadow: 0 0 0 3px rgba(245, 245, 245, 0.1);
}

.key-input::placeholder {
    color: var(--text-tertiary);
}

/* Domain Input */
.domain-input-container {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto 12px;
}

.domain-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.domain-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.dark-mode .domain-input:focus {
    box-shadow: 0 0 0 3px rgba(245, 245, 245, 0.1);
}

.domain-input::placeholder {
    color: var(--text-tertiary);
}

/* Buttons */
.btn-primary {
    padding: 16px 32px;
    background-color: var(--accent-color);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    padding: 14px 28px;
    background-color: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

/* Helper Text */
.helper-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.warning-text {
    color: var(--warning-color);
    font-size: 14px;
    max-width: 600px;
    margin: 0 auto;
}

/* Success Indicator */
.success-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--success-color);
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 500;
}

/* Sample Section */
.sample-section {
    margin-top: 80px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 32px;
    text-align: center;
    color: var(--text-primary);
}

.sample-report {
    position: relative;
}

.sample-report.blurred .valuation-grid {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
}

/* Valuation Grid */
.valuation-grid {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}

@media (min-width: 768px) {
    .valuation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Valuation Cards */
.valuation-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.valuation-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.confidence-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.confidence-badge:contains("High") {
    background-color: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
}

.card-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.card-reasoning {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.niche-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.detail-section {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

/* Loading State */
.loading-container {
    text-align: center;
    padding: 80px 0;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 32px;
}

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

.loading-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.loading-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Results State */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 24px;
}

.results-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    word-break: break-word;
}

.results-date {
    font-size: 14px;
    color: var(--text-secondary);
}

.export-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Ticker */
.ticker-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 16px 0;
    overflow: hidden;
    z-index: 50;
}

.ticker-track {
    display: flex;
    gap: 48px;
    animation: scroll 30s linear infinite;
    white-space: nowrap;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.ticker-domain {
    font-weight: 600;
    color: var(--text-primary);
}

.ticker-value {
    color: var(--success-color);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.modal-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.modal-warning {
    font-size: 14px;
    color: var(--warning-color);
    margin-top: 16px;
    padding: 12px 16px;
    background-color: rgba(217, 119, 6, 0.1);
    border-radius: 8px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex: 1;
}

/* Contact Buttons */
.contact-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background-color: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.contact-btn:hover {
    background-color: var(--bg-primary);
    border-color: var(--text-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .key-input-container,
    .domain-input-container {
        flex-direction: column;
    }

    .btn-primary {
        width: 100%;
    }

    .results-header {
        flex-direction: column;
    }

    .results-title {
        font-size: 24px;
    }

    .export-buttons {
        width: 100%;
        flex-direction: column;
    }

    .export-buttons .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .contact-buttons {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 32px 24px;
    }

    .valuation-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .main-content {
        padding: 40px 0 100px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }

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

    .modal-title {
        font-size: 24px;
    }
}

/* Footer */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
}

.footer-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-text a {
    color: var(--text-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.footer-text a:hover {
    color: var(--accent-color);
}
