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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    padding-bottom: 80px;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px 0;
}

.header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* Package Card */
.package-card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.status-active {
    background: rgba(52, 199, 89, 0.15);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-expired {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

/* Plan Name */
.plan-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
}

/* Circular Usage Display */
.usage-circle-wrapper {
    display: flex;
    justify-content: center;
    margin: 16px 0 24px;
}

.usage-circle {
    position: relative;
    width: 140px;
    height: 140px;
}

.usage-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.usage-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 8;
}

.usage-ring {
    fill: none;
    stroke: #34c759;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease, stroke 0.3s ease;
}

.usage-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.usage-percent {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.usage-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* Data Details */
.data-details {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.data-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.data-value {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.days-left-value {
    color: #34c759;
}

.data-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

/* Usage Bar */
.usage-bar-section {
    margin-bottom: 20px;
}

.usage-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #34c759 0%, #30d158 100%);
    transition: width 1s ease;
    border-radius: 4px;
}

.usage-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.25);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Expired Message */
.expired-message {
    text-align: center;
    padding: 16px;
    background: rgba(255, 59, 48, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 59, 48, 0.2);
    color: #ff6961;
    font-size: 14px;
    line-height: 1.5;
}

/* No Package Card */
.no-package-card {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.no-package-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-package-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.no-package-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
}

/* Server Info */
.server-info {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.server-info h3 {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.server-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

#server-flag {
    font-size: 22px;
}

#server-name {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.server-status {
    font-size: 12px;
    color: #34c759;
    background: rgba(52, 199, 89, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
}

/* Redeem Section */
.redeem-section {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.redeem-section h3 {
    margin-bottom: 8px;
    font-size: 16px;
}

.hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 14px;
    line-height: 1.5;
}

.redeem-input-group {
    display: flex;
    gap: 10px;
}

.redeem-input-group input {
    flex: 1;
}

.redeem-input-group .btn {
    width: auto;
    padding: 14px 20px;
    white-space: nowrap;
}

input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.2s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3a7bd5;
    background: rgba(255, 255, 255, 0.08);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 26, 0.95);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
}

.nav-item {
    text-align: center;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.2s ease;
    padding: 8px 24px;
    border-radius: 12px;
}

.nav-item.active {
    opacity: 1;
    background: rgba(0, 210, 255, 0.1);
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 3px;
}

.nav-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* Server card — clickable row on home */
.server-card {
    cursor: pointer;
}

.server-card-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
}

.server-card-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.server-chevron {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
}

/* Servers Page */
.servers-page-header {
    margin-bottom: 20px;
}

.servers-page-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

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

.server-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 40px 0;
    font-size: 14px;
}

.server-option-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.server-option-current {
    background: rgba(0, 210, 255, 0.07);
    border-color: rgba(0, 210, 255, 0.25);
}

.server-option-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.server-option-flag {
    font-size: 28px;
}

.server-option-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.server-option-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.server-option-location {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.server-option-right {
    flex-shrink: 0;
}

.server-option-badge {
    font-size: 13px;
    font-weight: 600;
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.12);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 210, 255, 0.25);
}

.btn-switch {
    width: auto;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-switch:active {
    transform: scale(0.97);
}

/* Switch Loading Overlay */
.switch-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.switch-overlay-content {
    text-align: center;
    padding: 32px;
    background: rgba(26, 26, 46, 0.95);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #00d2ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.switch-message {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }

    .header h1 {
        font-size: 28px;
    }

    .usage-circle {
        width: 120px;
        height: 120px;
    }

    .usage-percent {
        font-size: 24px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}
