@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    background: rgba(6, 12, 17, 1);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Font Classes */
.font-tracer {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    letter-spacing: -0.05em;
}

.font-text {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    font-weight: 400;
    letter-spacing: -0.05em;
}

/* Background Blur Elements */
.background-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.ellipse-1 {
    background: #ff6768;
    border-radius: 50%;
    width: 74px;
    height: 44px;
    position: absolute;
    right: 15px;
    top: 22px;
    filter: blur(40px);
}

.ellipse-2 {
    background: rgba(49, 226, 255, 0.96);
    border-radius: 50%;
    width: 169.15px;
    height: 16.74px;
    position: absolute;
    left: 95.55px;
    top: 36.24px;
    transform-origin: 0 0;
    transform: rotate(-147.369deg) scale(1.162, 0.806);
    filter: blur(22.5px);
}

.ellipse-3 {
    background: #03799b;
    border-radius: 50%;
    width: 169.15px;
    height: 16.74px;
    position: absolute;
    left: 184.91px;
    top: 34.72px;
    transform-origin: 0 0;
    transform: rotate(-147.369deg) scale(1.162, 0.806);
    filter: blur(22.5px);
}

/* ===== LOGIN PAGE ===== */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.login-panel,
.main-panel {
    background: rgba(6, 12, 17, 0.95);
    border-radius: 16px;
    border: 4px solid rgba(6, 12, 17, 0.4);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.login-content {
    padding: 60px 40px 50px 40px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.login-icon {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.login-icon svg {
    filter: drop-shadow(0 0 25px rgba(49, 226, 255, 0.8));
}

.login-title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: -0.05em;
    font-family: 'Orbitron', sans-serif;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin-bottom: 50px;
    font-weight: 400;
    letter-spacing: -0.05em;
}

.discord-login-button {
    background: radial-gradient(
        closest-side,
        rgba(49, 226, 255, 1) 0%,
        rgba(49, 226, 255, 0) 100%
    );
    border-radius: 8px;
    border: 0.5px solid rgba(49, 226, 255, 0.45);
    color: rgba(0, 0, 0, 0.75);
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0px -2px 8px 0px rgba(49, 226, 255, 1),
        0px 4px 20px 0px rgba(49, 226, 255, 0.35);
    letter-spacing: -0.05em;
    position: relative;
    overflow: hidden;
    min-width: 220px;
}

.discord-login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.discord-login-button:hover::before {
    left: 100%;
}

.discord-login-button:hover {
    box-shadow: 
        inset 0px -2px 8px 0px rgba(49, 226, 255, 1),
        0px 6px 30px 0px rgba(49, 226, 255, 0.5);
    transform: translateY(-1px);
}

.discord-login-button:active {
    transform: translateY(0);
}

.discord-login-button svg {
    width: 20px;
    height: 20px;
    fill: rgba(0, 0, 0, 0.75);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.discord-login-button span {
    position: relative;
    z-index: 1;
}

.login-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.footer-note {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 400;
    letter-spacing: -0.05em;
}

.discord-link {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    text-decoration: none;
    letter-spacing: -0.05em;
}

/* ===== MAIN PANEL (WHEEL PAGE) ===== */
.main-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1028px;
    padding: 20px;
}

.panel-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    position: relative;
    z-index: 2;
}

.header-left {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: center;
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.title-box {
    background: radial-gradient(
        closest-side,
        rgba(0, 152, 192, 1) 0%,
        rgba(0, 71, 90, 0) 100%
    );
    border-radius: 4px;
    padding: 7px;
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.title-dot {
    background: #31e2ff;
    border-radius: 1px;
    width: 5px;
    height: 5px;
    transform: rotate(-45deg) scale(1, 1);
}

.title-primary {
    color: #31e2ff;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.05em;
    font-family: 'Segoe UI', sans-serif;
}

.title-secondary {
    color: #ffffff;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.05em;
    font-family: 'Orbitron', sans-serif;
}

.title-roleplay {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.55) 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.05em;
    font-family: 'Orbitron', sans-serif;
    margin-left: 110px;
    margin-top: -16px;
}

.header-info {
    border-left: 1px solid #ffffff;
    padding-left: 10px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.info-text-small {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    line-height: 13px;
    letter-spacing: -0.05em;
    font-weight: 400;
}

.close-button-wrapper {
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px;
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
}

.close-text {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13.65px;
    letter-spacing: -0.05em;
    font-weight: 400;
    padding: 0 4px;
}

.close-button {
    background: linear-gradient(
        180deg,
        rgba(255, 103, 104, 1) 0%,
        rgba(187, 73, 74, 1) 100%
    );
    border-radius: 6px;
    border: 1px solid #ff6768;
    padding: 5px 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.close-button:hover {
    box-shadow: 0 0 15px rgba(255, 103, 104, 0.6);
}

.close-button::after {
    content: '×';
    color: white;
    font-size: 18px;
    line-height: 1;
}

/* ===== TABS ===== */
.tabs-container {
    display: flex;
    gap: 8px;
    padding: 0 24px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    margin-top: 0;
    position: relative;
    z-index: 2;
}

.tab-button {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(153, 153, 153, 0) 100%
    );
    border-radius: 8px;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.05em;
}

.tab-button:hover {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(153, 153, 153, 0.05) 100%
    );
}

.tab-button.active {
    background: radial-gradient(
        closest-side,
        rgba(49, 226, 255, 1) 0%,
        rgba(49, 226, 255, 0) 100%
    );
    border-color: rgba(49, 226, 255, 0.45);
    color: rgba(0, 0, 0, 0.75);
    box-shadow: 
        inset 0px -2px 8px 0px rgba(49, 226, 255, 1),
        0px 4px 20px 0px rgba(49, 226, 255, 0.35);
}

.tab-icon {
    font-size: 14px;
}

/* ===== TAB CONTENT ===== */
.panel-content {
    padding: 0;
    position: relative;
    z-index: 2;
}

.tab-content {
    display: none;
    min-height: 500px;
    padding: 24px;
}

.tab-content.active {
    display: block;
}

/* ===== WHEEL TAB ===== */
.wheel-tab-content {
    padding: 40px 24px;
}

.info-section {
    text-align: center;
    margin-bottom: 40px;
}

.info-text {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: -0.05em;
}

.cooldown-info {
    color: #ff6768;
    font-size: 14px;
    margin-top: 10px;
    font-weight: 400;
    letter-spacing: -0.05em;
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
}

.wheel-wrapper {
    position: relative;
    margin-bottom: 40px;
}

#wheelCanvas {
    border-radius: 50%;
    filter: drop-shadow(0 0 40px rgba(49, 226, 255, 0.4));
}

.wheel-pointer {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-top: 40px solid #31e2ff;
    z-index: 5;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(6, 12, 17, 0.95);
    border: 2px solid rgba(49, 226, 255, 0.45);
    border-radius: 50%;
    z-index: 6;
    box-shadow: 0 0 20px rgba(49, 226, 255, 0.4);
}

.wheel-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.spin-button {
    background: radial-gradient(
        closest-side,
        rgba(49, 226, 255, 1) 0%,
        rgba(49, 226, 255, 0) 100%
    );
    border-radius: 8px;
    border: 0.5px solid rgba(49, 226, 255, 0.45);
    color: rgba(0, 0, 0, 0.75);
    padding: 14px 40px;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0px -2px 8px 0px rgba(49, 226, 255, 1),
        0px 4px 20px 0px rgba(49, 226, 255, 0.35);
    letter-spacing: -0.05em;
}

.spin-button:hover:not(:disabled) {
    box-shadow: 
        inset 0px -2px 8px 0px rgba(49, 226, 255, 1),
        0px 6px 30px 0px rgba(49, 226, 255, 0.5);
    transform: translateY(-2px);
}

.spin-button:active:not(:disabled) {
    transform: translateY(0);
}

.spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gear-icon {
    font-size: 16px;
    display: inline-block;
    animation: rotate 2s linear infinite;
}

.spin-button:disabled .gear-icon {
    animation: rotate 0.5s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.result-section {
    margin: 40px 0;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-box {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(153, 153, 153, 0) 100%
    );
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 24px;
    display: inline-block;
}

.result-label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    margin-bottom: 12px;
    letter-spacing: -0.05em;
    font-weight: 400;
}

.result-text {
    color: #31e2ff;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.05em;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 20px rgba(49, 226, 255, 0.6);
}

/* ===== WINNINGS TAB ===== */
.winnings-tab-content {
    padding: 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h3 {
    color: #31e2ff;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: -0.05em;
    font-family: 'Orbitron', sans-serif;
}

.info-text-ticket {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 8px;
    letter-spacing: -0.05em;
    font-weight: 400;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(153, 153, 153, 0) 100%
    );
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 12px 20px;
    display: inline-block;
    margin-top: 15px;
}

.winnings-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.winnings-list::-webkit-scrollbar {
    width: 8px;
}

.winnings-list::-webkit-scrollbar-track {
    background: rgba(49, 226, 255, 0.1);
    border-radius: 4px;
}

.winnings-list::-webkit-scrollbar-thumb {
    background: rgba(49, 226, 255, 0.5);
    border-radius: 4px;
}

.winning-item {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(153, 153, 153, 0) 100%
    );
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.winning-item:hover {
    border-color: rgba(49, 226, 255, 0.3);
}

.winning-item .win-name {
    color: #31e2ff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.05em;
    font-family: 'Orbitron', sans-serif;
}

.winning-item .win-time {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    margin-top: 4px;
    letter-spacing: -0.05em;
}

.winning-item .win-expires {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    text-align: right;
    letter-spacing: -0.05em;
}

.loading-text, .no-winnings {
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    padding: 60px 20px;
    font-size: 14px;
    letter-spacing: -0.05em;
}

/* ===== PROFILE TAB ===== */
.profile-tab-content {
    padding: 24px;
}

.profile-content-box {
    max-width: 600px;
    margin: 0 auto;
}

.profile-info-grid {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(153, 153, 153, 0) 100%
    );
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 24px;
    margin-bottom: 24px;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.05em;
}

.profile-value {
    color: #31e2ff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.05em;
    font-family: 'Orbitron', sans-serif;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.action-button {
    background: radial-gradient(
        closest-side,
        rgba(49, 226, 255, 1) 0%,
        rgba(49, 226, 255, 0) 100%
    );
    border-radius: 8px;
    border: 0.5px solid rgba(49, 226, 255, 0.45);
    color: rgba(0, 0, 0, 0.75);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0px -2px 8px 0px rgba(49, 226, 255, 1),
        0px 4px 20px 0px rgba(49, 226, 255, 0.35);
    letter-spacing: -0.05em;
}

.action-button:hover {
    box-shadow: 
        inset 0px -2px 8px 0px rgba(49, 226, 255, 1),
        0px 6px 30px 0px rgba(49, 226, 255, 0.5);
    transform: translateY(-2px);
}

.logout-btn {
    background: linear-gradient(
        180deg,
        rgba(255, 103, 104, 1) 0%,
        rgba(187, 73, 74, 1) 100%
    );
    border: 1px solid #ff6768;
    color: white;
    box-shadow: 0px 4px 20px 0px rgba(255, 103, 104, 0.35);
}

.logout-btn:hover {
    box-shadow: 0px 6px 30px 0px rgba(255, 103, 104, 0.5);
}

/* ===== FOOTER ===== */
.panel-footer {
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    padding: 18px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-text {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    letter-spacing: -0.05em;
    font-weight: 400;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-container, .login-container {
        padding: 10px;
    }
    
    #wheelCanvas {
        width: 300px;
        height: 300px;
    }
    
    .title-secondary {
        font-size: 20px;
    }
    
    .tab-button {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .spin-button {
        padding: 12px 28px;
        font-size: 13px;
    }
}
