/* Premium Components */

/* Glassmorphism Panels */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 15px rgba(255, 255, 255, 0.05);
}

/* Action Banner */
.action-banner {
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fade-in-up 0.6s var(--transition-bounce) 0.1s both;
}

.action-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background: var(--gradient-success);
    z-index: 0;
}

.action-banner__content {
    position: relative;
    z-index: 1;
}

.action-banner__badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.action-banner__title {
    font-size: var(--text-md);
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}

.action-banner__gate {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-3);
}

.action-banner__desc {
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.6;
}

/* Grid & List for Gates */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    animation: fade-in-up 0.6s var(--transition-bounce) 0.2s both;
}

.section-title {
    font-size: var(--text-lg);
    font-weight: 700;
}

.gates-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    animation: fade-in-up 0.6s var(--transition-bounce) 0.3s both;
}

.gate-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
}

.gate-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gate-card__name {
    font-size: var(--text-base);
    font-weight: 700;
}

.gate-card__status-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.gate-card__time {
    text-align: right;
}

.gate-card__time-min {
    font-size: var(--text-xl);
    font-weight: 800;
}

.gate-card__time-label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* State Colors for specific gate states */
.state-success .gate-card__status-text {
    color: var(--color-success);
}

.state-success .gate-card__time-min {
    color: var(--color-success);
}

.state-warning .gate-card__status-text {
    color: var(--color-warning);
}

.state-warning .gate-card__time-min {
    color: var(--color-warning);
}

.state-danger .gate-card__status-text {
    color: var(--color-danger);
}

.state-danger .gate-card__time-min {
    color: var(--color-danger);
}

/* Affiliate Banner */
.affiliate-banner {
    display: none;
    /* hidden by default */
    background: var(--surface-color-solid);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
}

.affiliate-banner:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.affiliate-banner.active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fade-in-up 0.5s var(--transition-bounce);
}

.affiliate-banner__icon {
    font-size: var(--text-2xl);
    margin-right: var(--space-3);
}

.affiliate-banner__text {
    flex: 1;
    text-align: left;
}

.affiliate-banner__title {
    font-size: var(--text-sm);
    font-weight: 700;
    margin-bottom: 2px;
}

.affiliate-banner__desc {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.affiliate-banner__cta {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(255, 107, 107, 0.1);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
    font-weight: 700;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

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

.icon-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast), color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Loading Skeleton */
.loader-skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
    width: 100%;
}

.height-sm {
    height: 1rem;
}

.height-md {
    height: 2rem;
}

.height-lg {
    height: 4rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Error State */
.error-state {
    text-align: center;
    padding: var(--space-4);
    color: var(--color-danger);
}

/* App Controls and Language Select */
.app-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    width: 100%;
}

.lang-select {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-full);
    padding: 6px 12px;
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font-family);
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all var(--transition-fast);
}

.lang-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-select option {
    background: var(--surface-color-solid);
    color: var(--text-primary);
}

.theme-light .lang-select {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-light .lang-select:hover {
    background: rgba(0, 0, 0, 0.08);
}

.theme-light .lang-select option {
    background: var(--bg-color);
    color: var(--text-primary);
}

/* SEO Guide & Article */
.seo-guide {
    margin-top: var(--space-6);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    line-height: 1.6;
}

.seo-guide__title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
    text-align: center;
}

.seo-guide__section {
    margin-bottom: var(--space-4);
}

.seo-guide__section h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--color-primary);
}

.seo-guide__section p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.seo-guide__faq {
    margin-top: var(--space-5);
    border-top: 1px solid var(--surface-border);
    padding-top: var(--space-4);
}

.seo-guide__faq h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
    text-align: center;
}

/* Accordion */
.accordion {
    margin-bottom: var(--space-3);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.theme-light .accordion {
    background: rgba(0, 0, 0, 0.02);
}

.accordion[open] {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-light .accordion[open] {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

.accordion__title {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    /* Hide default arrow */
    position: relative;
    user-select: none;
}

.accordion__title::-webkit-details-marker {
    display: none;
    /* Hide default arrow in WebKit browsers */
}

.accordion__title::after {
    content: '+';
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: transform var(--transition-fast);
}

.accordion[open] .accordion__title::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}

.accordion__content {
    padding: 0 var(--space-4) var(--space-4) var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border-top: 1px solid var(--surface-border);
    margin-top: var(--space-2);
    padding-top: var(--space-3);
}