/* /public/style.css - */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@400;700&display=swap' );

:root {
    --primary-color: #00d1ff;
    --primary-glow: rgba(0, 209, 255, 0.5);
    --secondary-color: #ff00c1;
    --special-color: #fcee0a;
    --special-glow: rgba(252, 238, 10, 0.5);
    --dark-bg: #0d0d1a;
    --card-bg: rgba(18, 18, 34, 0.8);
    --text-color: #e0e0e0;
    --text-muted: #8a94a7;
    --success-color: #00ff9b;
    --border-color: rgba(0, 209, 255, 0.2);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    background-image: radial-gradient(var(--border-color) 1px, transparent 0);
    background-size: 40px 40px;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: rgba(13, 13, 26, 0.7);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-glow);
}
nav {
    display: flex;
    align-items: center;
    gap: 20px;
}
.lang-switcher {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border-radius: 5px;
    transition: background-color .3s;
}
.lang-switcher:hover {
    background-color: var(--card-bg);
}
.lang-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    list-style: none;
    z-index: 100;
    border-radius: 5px;
    overflow: hidden;
    min-width: 120px;
}
.lang-switcher:hover .lang-dropdown {
    display: block;
}
.lang-dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color .3s;
}
.lang-dropdown a:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}
.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.username-display {
    font-weight: 700;
    color: var(--text-color);
}

.btn {
    padding: 10px 20px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition: all .3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn:hover {
    color: var(--dark-bg);
    background-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
}
.btn-secondary {
    border-color: var(--text-muted);
    color: var(--text-muted);
}
.btn-secondary:hover {
    color: var(--dark-bg);
    background-color: var(--text-muted);
    border-color: var(--text-muted);
    box-shadow: none;
}
.btn-special {
    border-color: var(--special-color);
    color: var(--special-color);
}
.btn-special:hover {
    color: var(--dark-bg);
    background-color: var(--special-color);
    box-shadow: 0 0 20px var(--special-glow);
}
.btn-lg {
    padding: 15px 30px;
    font-size: 1.2rem;
}
.btn-sm {
    padding: 5px 10px;
    font-size: .9rem;
}
.btn-block {
    display: flex;
    width: 100%;
}

/* --- 5. 視圖容器 --- */
main.container {
    padding-top: 40px;
    padding-bottom: 40px;
}
.guest-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.logged-in-view section, .guest-view section {
    width: 100%;
    padding: 40px 0;
}

#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}
.hero-content {
    max-width: 800px;
}
.glitch {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    position: relative;
    color: var(--text-color);
    text-shadow: 0.05em 0 0 rgba(255,0,0,.75), -0.025em -0.05em 0 rgba(0,255,0,.75), 0.025em 0.05em 0 rgba(0,0,255,.75);
    animation: glitch 500ms infinite;
    margin-bottom: 1rem;
}
.glitch span { position: absolute; top: 0; left: 0; }
.glitch span:first-child {
    animation: glitch 650ms infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-0.025em, -0.0125em);
    opacity: 0.8;
}
.glitch span:last-child {
    animation: glitch 375ms infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    transform: translate(0.0125em, 0.025em);
    opacity: 0.8;
}
@keyframes glitch {
    0% { text-shadow: 0.05em 0 0 rgba(255,0,0,.75), -0.05em -0.025em 0 rgba(0,255,0,.75), -0.025em 0.05em 0 rgba(0,0,255,.75); }
    14% { text-shadow: 0.05em 0 0 rgba(255,0,0,.75), -0.05em -0.025em 0 rgba(0,255,0,.75), -0.025em 0.05em 0 rgba(0,0,255,.75); }
    15% { text-shadow: -0.05em -0.025em 0 rgba(255,0,0,.75), 0.025em 0.025em 0 rgba(0,255,0,.75), -0.05em -0.05em 0 rgba(0,0,255,.75); }
    49% { text-shadow: -0.05em -0.025em 0 rgba(255,0,0,.75), 0.025em 0.025em 0 rgba(0,255,0,.75), -0.05em -0.05em 0 rgba(0,0,255,.75); }
    50% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,.75), 0.05em 0 0 rgba(0,255,0,.75), 0 -0.05em 0 rgba(0,0,255,.75); }
    99% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,.75), 0.05em 0 0 rgba(0,255,0,.75), 0 -0.05em 0 rgba(0,0,255,.75); }
    100% { text-shadow: -0.025em 0 0 rgba(255,0,0,.75), -0.025em -0.025em 0 rgba(0,255,0,.75), -0.025em -0.05em 0 rgba(0,0,255,.75); }
}
#hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-message {
    text-align: center;
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--text-color);
}
.welcome-message span { color: var(--primary-color); }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 24px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, var(--primary-glow), transparent 30%);
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.card:hover::before {
    opacity: 1;
}
.card > * {
    position: relative;
    z-index: 1;
}
.card-header {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header i {
    margin-right: 8px;
    color: var(--primary-color);
}
.card-body {
    flex-grow: 1;
}
.balance-amount, .frozen-amount {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
}
.balance-amount { color: var(--success-color); }
.frozen-amount { color: var(--special-color); }
.balance-amount span, .frozen-amount span {
    font-size: 1rem;
    color: var(--text-muted);
    margin-left: 8px;
}
.user-id-display {
    font-size: 0.8em;
    color: var(--text-muted);
    background-color: rgba(0,0,0,0.2);
    padding: 2px 6px;
    border-radius: 4px;
}
.card-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}
.card-footer-text {
    margin-top: 20px;
    color: var(--text-muted);
}

.form-group { margin-bottom: 15px; }
.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
input[type="text"], input[type="password"], input[type="number"] {
    width: 100%;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color .3s, box-shadow .3s;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow);
}
.input-group { display: flex; }
.input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group button { border-top-left-radius: 0; border-bottom-left-radius: 0; }

.plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}
.plan-card {
    background: linear-gradient(145deg, rgba(30, 30, 50, 0.8), rgba(18, 18, 34, 0.8));
    border: 1px solid var(--border-color);
    padding: 24px;
    text-align: center;
    border-radius: 8px;
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
}
.plan-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 0 30px var(--primary-glow);
    border-color: var(--primary-color);
}
.plan-card.special:hover {
    box-shadow: 0 0 30px var(--special-glow);
    border-color: var(--special-color);
}
.plan-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.plan-card.special h3 { color: var(--special-color); }
.plan-card .amount {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}
.plan-card .return { color: var(--success-color); margin-bottom: 15px; font-weight: 700; }
.plan-card .duration { color: var(--text-muted); margin-bottom: 24px; }

.table-responsive { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
thead {
    background-color: rgba(0, 209, 255, 0.1);
}
th {
    font-family: var(--font-display);
    color: var(--primary-color);
}
tbody tr:last-child td {
    border-bottom: none;
}
.status-active { color: var(--special-color); font-weight: bold; }
.status-completed { color: var(--success-color); font-weight: bold; }

#feed-container {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 5px;
    height: 200px;
    overflow-y: auto;
    font-family: var(--font-body);
    border: 1px solid var(--border-color);
}
.feed-item {
    padding: 8px;
    border-bottom: 1px dashed var(--border-color);
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}
@keyframes fadeIn {
    to { opacity: 1; }
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--dark-bg);
    padding: 30px;
    border-radius: 8px;
    z-index: 1001;
    width: 90%;
    max-width: 450px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 40px var(--primary-glow);
}
.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color .3s, transform .3s;
}
.close-modal:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}
.modal h3 {
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-color);
}
.deposit-content { text-align: center; }
.qr-code-wrapper { margin: 20px 0; }
.qr-code-wrapper img { border-radius: 8px; border: 2px solid var(--primary-color); }

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    background-color: rgba(13, 13, 26, 0.7);
}
footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color .3s;
}
footer a:hover {
    color: var(--primary-color);
}

#referral-center {
    padding: 40px 20px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}
.referral-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.commission-amount {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary-color); 
}
.commission-amount span {
    font-size: 1rem;
    color: var(--text-muted);
    margin-left: 8px;
}
#referral-center .card-body p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}
#referral-center .card-body p strong {
    color: var(--primary-color);
    font-family: var(--font-display);
}
.section-subtitle {
    font-family: var(--font-display);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

#referral-list {
    margin-top: 40px;
}

#feed-container {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 5px;
    height: 200px; 
    overflow: hidden; 
    position: relative; 
    font-family: var(--font-body);
    border: 1px solid var(--border-color);
}

.feed-item-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.feed-item {
    padding: 8px 15px; 
    border-bottom: 1px dashed var(--border-color);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.2rem;
    }
    .user-actions .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .glitch {
        font-size: 2.5rem;
    }
    .welcome-message, .section-title {
        font-size: 2rem;
    }
    .modal {
        width: 95%;
        padding: 20px;
    }
}
