/* Strider Web - Run Preview Styles */

:root {
    --color-bg: #000000;
    --color-surface: #1a1a1a;
    --color-text: #ffffff;
    --color-text-secondary: #888888;
    --color-primary: #FF5A5F;
    --color-primary-hover: #ff4146;
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    padding: 20px 0;
}

.logo {
    height: 56px;
    width: auto;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--color-text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-surface);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* Error State */
.error {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error h2 {
    margin-bottom: 8px;
}

.error p {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Run Preview */
.run-preview {
    padding-bottom: 40px;
}

.run-header {
    margin-bottom: 20px;
}

.run-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.run-type-badge {
    display: inline-block;
    background-color: var(--color-surface);
    color: var(--color-text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
}

/* Map */
.map-container {
    width: 100%;
    height: 200px;
    background-color: var(--color-surface);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
}

/* Run Details */
.run-details {
    background-color: var(--color-surface);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid #333;
}

.detail-icon {
    width: 32px;
    font-size: 18px;
}

.detail-text {
    color: var(--color-text-secondary);
    font-size: 15px;
}

/* Description */
.run-description {
    margin-bottom: 20px;
    padding: 16px;
    background-color: var(--color-surface);
    border-radius: 12px;
}

.run-description p {
    color: var(--color-text-secondary);
    font-size: 15px;
}

/* Host Section */
.host-section {
    margin-bottom: 20px;
}

.section-label {
    color: var(--color-text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

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

.host-name {
    font-size: 17px;
    font-weight: 600;
}

/* Avatars */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--color-surface);
}

.avatar-medium {
    width: 48px;
    height: 48px;
}

.avatar-small {
    width: 36px;
    height: 36px;
}

/* Participants */
.participants-section {
    margin-bottom: 32px;
}

.participant-avatars {
    display: flex;
    gap: -8px;
}

.participant-avatars .avatar {
    margin-left: -8px;
    border: 2px solid var(--color-bg);
}

.participant-avatars .avatar:first-child {
    margin-left: 0;
}

.more-participants {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-left: -8px;
    border: 2px solid var(--color-bg);
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

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

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

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

/* Footer */
.footer-text {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 13px;
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 380px) {
    .container {
        padding: 16px;
    }

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