@font-face {
    font-family: GILROY;
    src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-300.TTF) format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: GILROY;
    src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-400.TTF) format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: GILROY;
    src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-500.TTF) format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: GILROY;
    src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-600.TTF) format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: GILROY;
    src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-700.TTF) format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: GILROY;
    src: url(https://cdn.fsksoft.com/fonts/gilroy/GILROY-800.TTF) format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --tp-50: #f9fafb;
    --tp-100: #f3f4f6;
    --tp-200: #e5e7eb;
    --tp-300: #d1d5db;
    --tp-400: #9ca3af;
    --tp-500: #3a3a41;
    --tp-600: #2a2a30;
    --tp-700: #202025;
    --tp-800: #16161a;
    --tp-900: #111115;
    --tp-950: #111115;
    --tp-orange: #53fc18;
    --tp-red: #ef4444;
    --tp-green: #10b981;
    --tp-blue: #3b82f6;
    --radius-lg: 28px;
    --radius-md: 20px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "GILROY", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0b0b0d;
    color: var(--tp-50);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(1200px, 90vw);
    margin: 0 auto;
    padding: 40px 0 80px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0 8px;
}

.simple-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.brand {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--tp-orange);
    box-shadow: 0 0 12px rgba(83, 252, 24, 0.8);
}

.tagline {
    margin: 0;
    color: var(--tp-400);
    font-size: 0.95rem;
}

.info-panel {
    gap: 12px;
}

.hero-panel {
    padding: 32px;
}

.summary-grid {
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.hero-cover {
    width: 100%;
    border-radius: 24px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
    display: none;
}

.status-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.info-banner {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(83, 252, 24, 0.1);
    border: 1px solid rgba(83, 252, 24, 0.2);
    color: var(--tp-orange);
    font-size: 0.9rem;
}

.info-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    display: none;
}

.nav-links {
    display: flex;
    gap: 16px;
}

.nav-links a {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, border 0.2s ease;
}

.nav-links a:hover {
    background: rgba(83, 252, 24, 0.15);
    border-color: rgba(83, 252, 24, 0.4);
}

.intro-card {
    background: rgba(32, 32, 37, 0.7);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 12px;
}

.intro-card h1 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.intro-card p {
    margin: 0;
    color: var(--tp-300);
    line-height: 1.6;
}

.primary-button,
.secondary-button {
    border: none;
    border-radius: 999px;
    font-weight: 600;
    padding: 14px 28px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: var(--tp-orange);
    color: #101010;
    box-shadow: 0 12px 40px rgba(83, 252, 24, 0.35);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 45px rgba(83, 252, 24, 0.45);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.08);
    color: var(--tp-50);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.danger-panel {
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.danger-button {
    background: var(--tp-red);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.danger-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.raffle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-top: 40px;
}

.simple-grid {
    margin-top: 28px;
}

.manage-grid {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 24px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.manage-raffle-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 640px;
    overflow: auto;
}

.raffle-list-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 15, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border 0.2s ease, background 0.2s ease;
}

.raffle-list-card.active {
    border-color: rgba(83, 252, 24, 0.4);
    background: rgba(83, 252, 24, 0.08);
}

.raffle-list-cover {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
}

.raffle-list-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.raffle-list-body h4 {
    margin: 0;
    font-size: 1rem;
}

.raffle-list-meta {
    font-size: 0.8rem;
    color: var(--tp-400);
}

.raffle-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.raffle-card-actions button {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    color: var(--tp-50);
    cursor: pointer;
}

.raffle-card-actions button.manage-btn {
    border-color: rgba(83, 252, 24, 0.4);
}

.raffle-card-actions button.delete-btn {
    border-color: rgba(239, 68, 68, 0.3);
}

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

.detail-summary {
    display: flex;
    gap: 18px;
    align-items: center;
}

.detail-cover {
    width: 120px;
    height: 120px;
    border-radius: 22px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-text h2 {
    margin: 8px 0 4px;
}

.detail-meta {
    font-size: 0.85rem;
    color: var(--tp-400);
}

.image-form input[type="file"] {
    padding: 0;
}

.detail-forms {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.card-form {
    padding: 18px;
    border-radius: 18px;
    background: rgba(15, 15, 18, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.card-form h3 {
    margin: 0;
    font-size: 1rem;
}

.detail-footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.raffle-card {
    background: rgba(22, 22, 26, 0.8);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: border 0.2s ease, transform 0.2s ease;
}

.raffle-card:hover {
    border-color: rgba(83, 252, 24, 0.4);
    transform: translateY(-4px);
}

.raffle-card img {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    background: rgba(255, 255, 255, 0.04);
}

.raffle-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--tp-300);
    font-size: 0.9rem;
}

.card-link {
    align-self: flex-start;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(83, 252, 24, 0.4);
    color: var(--tp-50);
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.card-link:hover {
    background: rgba(83, 252, 24, 0.2);
}

.raffle-layout {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-top: 28px;
}

.pill {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
}

.pill.success-pill {
    background: rgba(16, 185, 129, 0.2);
    color: var(--tp-green);
}

.detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 32px;
    margin-top: 30px;
}

.panel {
    background: rgba(32, 32, 37, 0.85);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 15px;
}

.panel h2 {
    margin: 0;
    font-size: 1.3rem;
}

.panel-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.winner-panel {
    gap: 24px;
}

.winner-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    justify-content: center;
    height: 100%;
}

.winner-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.winner-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--tp-200);
}

.winner-badge.active {
    background: rgba(83, 252, 24, 0.18);
    color: var(--tp-orange);
}
.participant-grid {
    display: flex;
    gap: 5px;
    flex-direction: column;
    overflow-y: scroll;
    max-height: 300px;
}

.participant-card {
    padding: 10px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.participant-handle {
    font-weight: 600;
}

.participant-link {
    font-size: 0.8rem;
    color: var(--tp-orange);
}

.winner-avatar {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(83, 252, 24, 0.4);
    object-fit: cover;
    display: none;
}

.winner-username {
    font-size: 1.6rem;
    font-weight: 600;
    min-height: 1.4em;
}

.winner-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.95rem;
}

.winner-info a {
    color: var(--tp-orange);
}

.winner-notice {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.two-buttons button {
    flex: 1;
}

.prize-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.prize-item {
    padding: 16px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.prize-status {
    display: flex;
    align-items: center;
}

.prize-item strong {
    font-size: 1rem;
}

.form-grid {
    display: grid;
    gap: 16px;
}

label {
    font-size: 0.95rem;
    color: var(--tp-200);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

input[type="text"],
input[type="url"],
textarea,
select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    color: var(--tp-50);
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.status-badge,
.success-badge,
.error-badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 999px;
    align-self: flex-start;
}

.success-badge {
    background: rgba(83, 252, 24, 0.15);
    color: var(--tp-orange);
}

.error-badge {
    background: rgba(239, 68, 68, 0.15);
    color: var(--tp-red);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ghost-button {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: var(--tp-100);
    border-radius: 14px;
    padding: 12px 18px;
    cursor: pointer;
}

.winner-strip {
    background: rgba(83, 252, 24, 0.08);
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid rgba(83, 252, 24, 0.2);
}

.table-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table-list tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-list td {
    padding: 12px 6px;
}

.empty-state {
    padding: 40px;
    text-align: center;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
    color: var(--tp-300);
}

.tiny {
    font-size: 0.8rem;
    color: var(--tp-400);
}

@media (max-width: 900px) {
    .manage-grid {
        grid-template-columns: 1fr;
    }
    .summary-grid {
        grid-template-columns: 1fr;
    }
    .detail-summary {
        flex-direction: column;
        align-items: flex-start;
    }
    .detail-shell {
        grid-template-columns: 1fr;
    }
    .panel {
        padding: 20px;
    }
    .site-header {
        flex-direction: column;
        gap: 16px;
    }
    .page-shell {
        width: min(100%, 94vw);
    }
}
