/* Modern Glassmorphic Dark Theme for Liaoyuan Portal */
:root {
    --bg-color: #0b0c10;
    --card-bg: rgba(31, 40, 51, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #c5c6c7;
    --accent: #ff4d4d;          /* Revolutionary red accent */
    --accent-glow: rgba(255, 77, 77, 0.4);
    --gold: #ffcc00;            /* Gold accent for headings and important buttons */
    --gold-glow: rgba(255, 204, 0, 0.35);
    --blue: #45f3ff;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 10% 20%, rgba(255, 77, 77, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(255, 204, 0, 0.03) 0px, transparent 50%);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 77, 77, 0.3);
}

.container {
    max-width: 800px;
    width: 90%;
    margin: 40px auto;
    padding: 30px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    box-sizing: border-box;
}

header {
    text-align: center;
    padding: 40px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header img {
    width: 110px;
    height: auto;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transition: var(--transition);
    margin-bottom: 20px;
}

header img:hover {
    transform: rotate(360deg);
    border-color: var(--gold);
    box-shadow: 0 0 25px var(--gold-glow);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--gold), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

header p.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 10px;
}

section {
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

h2 {
    color: var(--gold);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
    display: flex;
    align-items: center;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background: linear-gradient(to bottom, var(--gold), var(--accent));
    border-radius: 2px;
}

p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 20px;
}

/* Button & Link Styles */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #ffb300);
    color: #0b0c10;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.5);
    background: linear-gradient(135deg, #ffd633, var(--gold));
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 77, 77, 0.3);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent), #ff1a1a);
    color: var(--text-primary);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 77, 77, 0.6);
}

.link-highlight {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 1px dashed var(--blue);
    padding-bottom: 2px;
}

.link-highlight:hover {
    color: var(--text-primary);
    border-bottom-style: solid;
    border-bottom-color: var(--accent);
}

/* Info Alert Box */
.alert-box {
    background: rgba(255, 77, 77, 0.08);
    border: 1px solid rgba(255, 77, 77, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    margin: 20px 0;
}

.alert-box p {
    margin: 0;
    color: var(--text-secondary);
}

.alert-box strong {
    color: var(--accent);
}

/* Footer styling */
footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(11, 12, 16, 0.85);
}

footer p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* Loading / Redirect Styles */
.loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--accent);
    border-right-color: var(--gold);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin-bottom: 30px;
    box-shadow: 0 0 15px var(--accent-glow);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-list {
    margin-top: 30px;
    text-align: left;
    width: 100%;
    max-width: 400px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

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

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-badge.checking {
    background-color: rgba(255, 204, 0, 0.15);
    color: var(--gold);
}

.status-badge.success {
    background-color: rgba(69, 243, 255, 0.15);
    color: var(--blue);
}

.status-badge.error {
    background-color: rgba(255, 77, 77, 0.15);
    color: var(--accent);
}

/* Media queries for responsiveness */
@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 20px;
        margin: 20px auto;
    }
    header h1 {
        font-size: 1.8rem;
    }
    .button-grid {
        grid-template-columns: 1fr;
    }
    h2 {
        font-size: 1.3rem;
    }
}
