/* Downloads Module - Frontend Styles */

.downloads-widget {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.downloads-widget-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

.downloads-icon {
    font-size: 48px;
    margin-right: 15px;
}

.downloads-widget-title h3 {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
}

.downloads-widget-description {
    margin: 5px 0 0 0;
    color: #b0b0b0;
    font-size: 14px;
}

.downloads-widget-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Version Info */
.downloads-version-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.downloads-version-item {
    background: rgba(102, 126, 234, 0.1);
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

.downloads-version-item label {
    display: block;
    color: #b0b0b0;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.downloads-version-item strong {
    display: block;
    color: #667eea;
    font-size: 18px;
}

/* Buttons */
.downloads-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.downloads-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.downloads-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.downloads-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

.downloads-patch-button {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border: 1px solid #667eea;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
}

.downloads-patch-button:hover {
    background: #667eea;
    color: white;
}

/* Changelog */
.downloads-changelog {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

.downloads-changelog h4 {
    margin: 0 0 10px 0;
    color: #667eea;
}

.downloads-changelog-content {
    color: #d0d0d0;
    font-size: 14px;
    line-height: 1.5;
}

/* Patches */
.downloads-patches {
    background: rgba(102, 126, 234, 0.05);
    padding: 15px;
    border-radius: 4px;
}

.downloads-patches h4 {
    margin: 0 0 5px 0;
    color: #667eea;
}

.downloads-patches-note {
    margin: 0 0 15px 0;
    color: #b0b0b0;
    font-size: 12px;
}

.downloads-patch-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.downloads-patch-item:last-child {
    border-bottom: none;
}

.downloads-patch-label {
    min-width: 120px;
    color: #e0e0e0;
    font-size: 13px;
}

/* Checksum */
.downloads-checksum {
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    padding-top: 15px;
}

.downloads-checksum details {
    cursor: pointer;
}

.downloads-checksum summary {
    color: #667eea;
    font-size: 13px;
    padding: 8px;
    border-radius: 4px;
    background: rgba(102, 126, 234, 0.1);
}

.downloads-checksum summary:hover {
    background: rgba(102, 126, 234, 0.2);
}

.downloads-checksum-code {
    display: block;
    background: rgba(0, 0, 0, 0.5);
    color: #00ff00;
    padding: 12px;
    border-radius: 4px;
    font-size: 11px;
    overflow-x: auto;
    margin-top: 10px;
    word-break: break-all;
}

/* List */
.downloads-list {
    margin: 20px 0;
}

.downloads-list-title {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-size: 24px;
}

.downloads-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.downloads-list-item {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.downloads-list-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    border-color: #764ba2;
}

.downloads-list-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.downloads-list-item h4 {
    margin: 10px 0;
    color: #ffffff;
}

.downloads-list-item p {
    margin: 10px 0;
    color: #b0b0b0;
    font-size: 13px;
}

.downloads-list-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 15px 0;
    color: #667eea;
    font-size: 12px;
}

.downloads-list-button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.downloads-list-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Leaderboard */
.downloads-leaderboard {
    margin: 20px 0;
}

.downloads-leaderboard-title {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-size: 24px;
}

.downloads-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #667eea;
    border-radius: 8px;
    overflow: hidden;
}

.downloads-leaderboard-table thead {
    background: rgba(102, 126, 234, 0.2);
    border-bottom: 2px solid #667eea;
}

.downloads-leaderboard-table th {
    padding: 12px;
    text-align: left;
    color: #667eea;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.downloads-leaderboard-table td {
    padding: 12px;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.downloads-leaderboard-table tbody tr {
    transition: background 0.3s ease;
}

.downloads-leaderboard-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

.downloads-leaderboard-latest {
    background: rgba(102, 126, 234, 0.15) !important;
}

.downloads-leaderboard-rank {
    font-weight: 600;
    font-size: 16px;
    color: #667eea;
}

.downloads-leaderboard-version strong {
    color: #ffffff;
}

.downloads-leaderboard-version small {
    color: #b0b0b0;
    display: block;
    margin-top: 4px;
}

.downloads-leaderboard-downloads {
    font-weight: 600;
    color: #667eea;
}

/* Error */
.downloads-error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff4444;
    border-radius: 4px;
    padding: 12px;
    color: #ff8888;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .downloads-widget-header {
        flex-direction: column;
        text-align: center;
    }

    .downloads-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .downloads-version-info {
        grid-template-columns: 1fr;
    }

    .downloads-buttons {
        flex-direction: column;
    }

    .downloads-button,
    .downloads-list-button {
        width: 100%;
        text-align: center;
    }

    .downloads-list-grid {
        grid-template-columns: 1fr;
    }

    .downloads-patch-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
