/* CSS Design System for FRP Xiaomi Dask Mode */

:root {
    /* Color Palette */
    --bg-primary: #09090b; /* Zinc 950 */
    --bg-secondary: #0e0e11; 
    --bg-card: #18181b; /* Zinc 900 */
    --bg-card-hover: #202024;
    --border: #27272a; /* Zinc 800 */
    --border-hover: #3f3f46; /* Zinc 700 */
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa; /* Zinc 400 */
    --text-muted: #71717a; /* Zinc 500 */
    
    /* Branding Colors */
    --xiaomi-orange: #ff6700;
    --xiaomi-orange-glow: rgba(255, 103, 0, 0.15);
    
    --success-green: #22c55e;
    --success-green-glow: rgba(34, 197, 94, 0.2);
    
    --danger-red: #ef4444;
    --danger-red-glow: rgba(239, 68, 68, 0.2);
    
    /* Typography & Spacing */
    --font-display: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --max-width: 1200px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-display);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background-color: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 72px;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    color: var(--xiaomi-orange);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-text .highlight {
    color: var(--xiaomi-orange);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: var(--transition);
}

.status-badge.online {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-green);
    border-color: rgba(34, 197, 94, 0.2);
}

.status-badge.offline {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-red);
    border-color: rgba(239, 68, 68, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.online .status-dot {
    background-color: var(--success-green);
    box-shadow: 0 0 10px var(--success-green);
    animation: pulse 1.5s infinite;
}

.offline .status-dot {
    background-color: var(--danger-red);
    box-shadow: 0 0 10px var(--danger-red);
}

/* Hero Section */
.hero {
    padding-top: 140px;
    padding-bottom: 48px;
    text-align: center;
}

.hero-container {
    max-width: 800px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--xiaomi-orange) 30%, #ff8c3a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content Layout */
.main-content {
    padding-bottom: 80px;
}

/* Server Section & Cards */
.server-section {
    margin-bottom: 64px;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.single-card-layout {
    max-width: 480px;
    margin: 0 auto 24px auto;
}

.two-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .two-card-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 840px;
        margin: 0 auto 24px auto;
    }
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--x, 0px) var(--y, 0px), rgba(255, 255, 255, 0.03), transparent 40%);
    pointer-events: none;
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.highlight-card {
    border-color: rgba(255, 103, 0, 0.3);
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(255, 103, 0, 0.03) 100%);
}

.highlight-card:hover {
    border-color: var(--xiaomi-orange);
    box-shadow: 0 12px 30px var(--xiaomi-orange-glow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
}

.two-card-grid .card-header {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.two-card-grid .card-icon-wrapper {
    width: 44px;
    height: 44px;
    font-size: 22px;
}

.highlight-card .card-icon-wrapper {
    background-color: rgba(255, 103, 0, 0.1);
    color: var(--xiaomi-orange);
}

.card-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.card-body {
    margin-bottom: 24px;
}

.two-card-grid .card-body {
    text-align: center;
}

.mono-text {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: block;
    word-break: break-all;
}

.two-card-grid .mono-text {
    font-size: 26px;
    color: var(--text-primary);
    text-align: center;
    margin: 8px 0;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--xiaomi-orange);
    color: white;
}

.btn-primary:hover {
    background-color: #ff852d;
    box-shadow: 0 0 16px rgba(255, 103, 0, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    color: var(--xiaomi-orange);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

/* Update Info Badge */
.update-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 16px;
}

/* Instructions Section */
.instructions-section {
    margin-bottom: 64px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
    position: relative;
    padding-left: 16px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
    background-color: var(--xiaomi-orange);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    transition: var(--transition);
}

.step-card:hover {
    border-color: rgba(255, 103, 0, 0.2);
}

.step-num {
    font-family: var(--font-mono);
    font-size: 36px;
    font-weight: 700;
    color: rgba(255, 103, 0, 0.2);
    margin-bottom: 16px;
    line-height: 1;
}

.step-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.step-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Download Section */
.download-section {
    margin-bottom: 48px;
}

.download-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.download-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: var(--transition);
}

@media (min-width: 480px) {
    .download-card {
        flex-direction: row;
        align-items: center;
    }
    
    .download-card .btn {
        width: auto;
        white-space: nowrap;
    }
}

.download-card:hover {
    border-color: var(--border-hover);
    background-color: var(--bg-card);
}

.download-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.download-icon {
    font-size: 28px;
    color: var(--xiaomi-orange);
    background-color: rgba(255, 103, 0, 0.1);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.download-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Toast Alert */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #1e1b4b; /* Dark indigo */
    border: 1px solid #3730a3;
    color: #e0e7ff;
    padding: 12px 24px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 18px;
    color: #818cf8;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 35px 0;
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 14px;
}

.footer-container {
    text-align: center;
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Anti-copy text selection restriction */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
