/* ============================================
   BRZ Download Page Styles
   다운로드 페이지 전용 스타일
   ============================================ */

/* Page Layout */
.download-page {
    background-color: var(--brz-bg-main);
    min-height: 100vh;
}

.download-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Page Header */
.download-page-header {
    text-align: center;
    margin-bottom: 60px;
}

.download-logo {
    width: 100%;
    max-width: 160px;
    height: auto;
    margin-bottom: 24px;
    object-fit: contain;
}

.download-page-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--brz-text-primary);
}

/* Platform Grid */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Platform Card */
.platform-card {
    background-color: var(--brz-bg-card);
    border: 1px solid var(--brz-border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.platform-card:hover {
    border-color: var(--brz-primary);
    transform: translateY(-2px);
}

.platform-card.active {
    border-color: var(--brz-primary);
    background-color: var(--brz-primary-light);
    box-shadow: 0 0 0 3px var(--brz-primary-light);
}

.platform-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px auto;
    display: block;
    object-fit: contain;
}

.platform-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--brz-text-primary);
}

/* Download Area Panel */
.download-area-panel {
    margin-top: 32px;
    background: var(--brz-bg-card);
    border: 1px solid var(--brz-border);
    border-radius: 8px;
    padding: 32px;
    animation: slideDown 0.3s ease;
}

/* File Download Content */
.download-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background-color: var(--brz-bg-main);
    border: 1px solid var(--brz-border);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: var(--brz-text-primary);
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.download-card:not(.is-disabled):hover {
    border-color: var(--brz-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.download-card.is-disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.download-card-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0; /* Prevents flex item from overflowing */
}

.download-card-icon svg {
    width: 36px;
    height: 36px;
    color: var(--brz-primary);
    flex-shrink: 0;
}

.download-card-info {
    min-width: 0;
}

.download-card-filename {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-card-meta {
    font-size: 13px;
    color: var(--brz-text-secondary);
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.download-card-meta .separator {
    display: none; /* Hidden by default, shown by JS */
}

.download-card-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--brz-primary);
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 50px;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.download-card:not(.is-disabled):hover .download-card-action {
    filter: brightness(1.1);
}

.download-card-action svg {
    width: 18px;
    height: 18px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .download-card {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }
    .download-card-action {
        justify-content: center;
        margin-top: 12px;
    }
}

.download-area-panel .brz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.download-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--brz-border);
    color: var(--brz-text-primary);
}

/* Install Link Content */
.install-link-content .instruction-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--brz-text-primary);
}

.install-link-content .instruction-steps {
    font-size: 14px;
    color: var(--brz-text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
    padding-left: 20px;
}

.install-link-content .instruction-steps li {
    margin-bottom: 10px;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.loading-overlay.visible {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--brz-primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Success Message Modal */
.success-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--brz-bg-card);
    border: 1px solid var(--brz-border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.success-message.visible {
    display: block;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    color: #27ae60;
}

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

.success-description {
    font-size: 14px;
    color: var(--brz-text-secondary);
    margin-bottom: 24px;
}

/* Utility Classes */
.download-warning {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #e74c3c;
}

/* Guide Banner */
.guide-banner {
    margin-top: 40px;
    background-color: var(--brz-bg-card);
    border: 1px solid var(--brz-border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.guide-banner-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--brz-text-primary);
    margin: 0 0 4px 0;
}

.guide-banner-description {
    font-size: 14px;
    color: var(--brz-text-secondary);
    margin: 0;
}

.guide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brz-primary);
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 15px;
    border: none;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.guide-button:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.guide-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}