/* premium-daily Phase 1 Demo Styles */

:root {
    --color-bg: #0a0a0a;
    --color-bg-elevated: #141414;
    --color-bg-card: #1a1a1a;
    --color-text: #e5e5e5;
    --color-text-muted: #a1a1a1;
    --color-accent: #f59e0b;
    --color-accent-dark: #d97706;
    --color-border: #2a2a2a;
    --color-green: #10b981;
    --color-yellow: #f59e0b;
    --color-red: #ef4444;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

/* Header */
.header {
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
}

.demo-badge {
    background: var(--color-accent);
    color: var(--color-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Main */
.main {
    flex: 1;
    padding: var(--spacing-xl) 0;
}

/* Section */
.section {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-md);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

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

/* Form */
.search-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    pointer-events: none;
}

input,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text);
    font-size: 1rem;
    transition: var(--transition);
}

.input-wrapper input {
    padding-right: 3.5rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
}

select {
    cursor: pointer;
}

.form-info {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    color: var(--color-text-muted);
}

/* Buttons */
.btn {
    position: relative;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary {
    background: var(--color-accent);
    color: var(--color-bg);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-accent-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-accent);
    color: var(--color-bg);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-bg);
    width: 100%;
}

.btn-accent:hover:not(:disabled) {
    background: var(--color-accent-dark);
}

.btn.loading .btn-text {
    visibility: hidden;
}

.btn-loader {
    display: none;
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn.loading .btn-loader {
    display: block;
}

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

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.result-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    transition: var(--transition);
}

.result-card:hover {
    border-color: var(--color-accent);
}

.result-card-header {
    margin-bottom: var(--spacing-sm);
}

.result-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.result-card-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.result-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: var(--spacing-sm);
}

.result-card-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.result-card-detail-label {
    color: var(--color-text-muted);
}

.result-card-detail-value {
    font-weight: 600;
}

.result-card-location {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

/* Top 3 Grid */
.top3-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.top3-card {
    background: var(--color-bg-card);
    border: 2px solid var(--color-accent);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    position: relative;
}

.top3-rank {
    position: absolute;
    top: -12px;
    left: var(--spacing-md);
    background: var(--color-accent);
    color: var(--color-bg);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.top3-card-header {
    margin-bottom: var(--spacing-md);
    padding-top: var(--spacing-sm);
}

.top3-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.top3-card-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
}

.top3-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.top3-details,
.top3-scores {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.top3-detail,
.top3-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.top3-detail-label,
.top3-score-label {
    color: var(--color-text-muted);
}

.top3-detail-value {
    font-weight: 600;
}

.score-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.risk-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.risk-light.green {
    background: var(--color-green);
    box-shadow: 0 0 8px var(--color-green);
}

.risk-light.yellow {
    background: var(--color-yellow);
    box-shadow: 0 0 8px var(--color-yellow);
}

.risk-light.red {
    background: var(--color-red);
    box-shadow: 0 0 8px var(--color-red);
}

.top3-why {
    grid-column: 1 / -1;
    margin-top: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--color-bg);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* Report */
.report-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
}

.report-content h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.report-content h2 {
    font-size: 1.5rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    color: var(--color-accent);
}

.report-content h3 {
    font-size: 1.25rem;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.report-content ul {
    list-style: none;
    padding-left: var(--spacing-md);
}

.report-content li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.report-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

.report-content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--spacing-lg) 0;
}

.report-content strong {
    color: var(--color-accent);
}

/* Footer */
.footer {
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-lg) 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-nav {
    display: flex;
    gap: var(--spacing-md);
}

.footer-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Toast */
.toast {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    background: var(--color-red);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: var(--spacing-md);
    }

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

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

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

    .top3-card-body {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .toast {
        left: var(--spacing-md);
        right: var(--spacing-md);
    }
}

/* Utility */
.text-accent {
    color: var(--color-accent);
}

.text-green {
    color: var(--color-green);
}

.text-yellow {
    color: var(--color-yellow);
}

.text-red {
    color: var(--color-red);
}
