/* ==========================================
   Markets Portal - Styles
   ========================================== */

:root {
    --portal-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent-green: #00A651;
    --accent-gold: #FFCD00;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--portal-bg);
    color: var(--text-primary);
    min-height: 100vh;
}

.portal-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.portal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--card-border);
}

.portal-header .header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-green);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.portal-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lang-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
}

.lang-select:focus {
    outline: none;
    border-color: var(--accent-green);
}

/* Main Content */
.portal-main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.portal-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Country Cards Grid */
.countries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 1000px) {
    .countries-grid {
        grid-template-columns: 1fr;
    }
}

.country-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.country-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-green);
    box-shadow: 0 20px 40px rgba(0, 166, 81, 0.1);
}

/* Country-specific accents */
.country-card.japan {
    border-top: 3px solid #dc3545;
}

.country-card.australia {
    border-top: 3px solid #00843D;
}

.country-card.thailand {
    border-top: 3px solid #0066b2;
}

.country-card.canada {
    border-top: 3px solid #ff0000;
}

.country-flag {
    margin-bottom: 1rem;
}

.flag-emoji {
    font-size: 2.5rem;
}

.country-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.country-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Market Links */
.market-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.market-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.market-link:hover {
    background: rgba(0, 166, 81, 0.1);
    border-color: var(--accent-green);
}

.market-link.coming-soon {
    opacity: 0.6;
    cursor: default;
}

.market-link.coming-soon:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--card-border);
}

.link-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(0, 166, 81, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent-green);
}

.link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.link-text strong {
    font-size: 1rem;
    font-weight: 600;
}

.link-text small {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.live {
    background: rgba(0, 166, 81, 0.2);
    color: var(--accent-green);
}

.status-badge.coming-soon {
    background: rgba(255, 205, 0, 0.2);
    color: var(--accent-gold);
}

/* Features Section */
.features-section {
    padding: 3rem 0;
    border-top: 1px solid var(--card-border);
}

.features-section h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    background: rgba(0, 166, 81, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-green);
}

.feature-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Footer */
.portal-footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .portal-header .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .portal-header h1 {
        order: -1;
        width: 100%;
        text-align: center;
    }

    .portal-main {
        padding: 1.5rem;
    }

    .country-card {
        padding: 1.25rem;
    }
}
