/* User Dashboard Styles */
.user-dashboard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dashboard.hidden {
    display: none;
}

.dashboard-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.dashboard-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dashboard-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

.builds-container {
    min-height: 200px;
}

.loading, .no-builds, .error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-builds p, .error p {
    margin-bottom: 20px;
    font-size: 16px;
}

.builds-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.build-item {
    background: #2d2d2d;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #555;
    transition: all 0.3s ease;
}

.build-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.build-item.success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #1a2e1a, #0f1f0f);
}

.build-item.building {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #2e2a17, #1f1a0f);
}

.build-item.failed {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #2e1a1a, #1f0f0f);
}

.build-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.build-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.build-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.build-id, .build-date {
    font-family: 'Monaco', 'Menlo', monospace;
}

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

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.building {
    background: #fff3cd;
    color: #856404;
}

.status-badge.failed {
    background: #f8d7da;
    color: #721c24;
}

.build-details {
    margin-bottom: 15px;
    line-height: 1.6;
}

.build-details p {
    margin: 4px 0;
    font-size: 14px;
    color: #555;
}

.build-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.download-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    text-decoration: none;
    color: white;
}

.android-btn {
    background: linear-gradient(135deg, #34a853, #137333);
}

.android-btn:hover {
    box-shadow: 0 4px 8px rgba(52, 168, 83, 0.3);
}

.ios-btn {
    background: linear-gradient(135deg, #007aff, #0051d5);
}

.ios-btn:hover {
    box-shadow: 0 4px 8px rgba(0, 122, 255, 0.3);
}

.retry-btn {
    background: linear-gradient(135deg, #6f42c1, #5a2d91);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(111, 66, 193, 0.3);
}

.no-downloads {
    color: #999;
    font-style: italic;
    font-size: 14px;
}

/* Navigation Button */
.nav-dashboard-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.nav-dashboard-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .dashboard-header {
        padding: 15px 20px;
    }
    
    .dashboard-header h2 {
        font-size: 20px;
    }
    
    .dashboard-body {
        padding: 15px 20px;
    }
    
    .build-item {
        padding: 15px;
    }
    
    .build-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .build-actions {
        justify-content: flex-start;
    }
    
    .download-links {
        width: 100%;
    }
    
    .download-btn {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .dashboard-content {
        width: 98%;
    }
    
    .dashboard-header {
        padding: 12px 15px;
    }
    
    .dashboard-body {
        padding: 15px;
    }
    
    .build-item {
        padding: 12px;
    }
    
    .download-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}
