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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #2d2d3f;
    color: #f0f0f0;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
header {
    background: #252536;
    border-bottom: 1px solid #3a3a4e;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5a9e9e;
    text-decoration: none;
}

header nav a {
    color: #5a9e9e;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 12px;
    border: 1px solid #5a9e9e;
    border-radius: 6px;
}

header nav a:hover {
    background: #5a9e9e;
    color: #1a1a2a;
}

.logout-link {
    background: none;
    border: none;
    color: #5a9e9e;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.logout-link:hover {
    background: #5a9e9e;
    color: #1a1a2a;
}

/* Main */
main {
    flex: 1;
    padding-top: 24px;
    padding-bottom: 32px;
}

/* Footer */
footer {
    background: #252536;
    border-top: 1px solid #3a3a4e;
    padding: 16px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #a0a0b0;
}

footer a {
    color: #5a9e9e;
    text-decoration: none;
}

/* Typography */
h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #f0f0f0;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #f0f0f0;
}

p {
    margin-bottom: 12px;
}

.subtitle {
    color: #a0a0b0;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* Cards */
.card {
    background: #3a3a4e;
    border: 1px solid #4a4a5e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.card h2 {
    margin-bottom: 4px;
}

.card .badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.badge-free {
    background: rgba(74, 222, 128, 0.15);
    color: #6ee7a0;
}

.badge-popular {
    background: rgba(90, 158, 158, 0.15);
    color: #7ec4c4;
}

.card .features {
    color: #a0a0b0;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s;
    width: 100%;
}

.btn-primary {
    background: #4a8c8c;
    color: #f0f0f0;
}

.btn-primary:hover {
    background: #6ab0b0;
}

.btn-green {
    background: #3d8b5e;
    color: #f0f0f0;
}

.btn-green:hover {
    background: #4da870;
}

.btn-outline {
    background: transparent;
    color: #5a9e9e;
    border: 1px solid #5a9e9e;
}

.btn-outline:hover {
    background: rgba(90, 158, 158, 0.1);
}

/* Price buttons grid */
.price-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #333346;
    border: 1px solid #4a4a5e;
    border-radius: 8px;
    text-decoration: none;
    color: #f0f0f0;
    transition: border-color 0.15s, background 0.15s;
}

.price-btn:hover {
    border-color: #5a9e9e;
    background: #3d3d52;
}

.price-btn .period {
    font-weight: 600;
}

.price-btn .price {
    font-weight: 700;
    color: #7ec4c4;
}

.price-btn .discount {
    font-size: 0.8rem;
    color: #6ee7a0;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: #c0c0d0;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #4a4a5e;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s;
    background: #333346;
    color: #f0f0f0;
}

.form-group input:focus {
    border-color: #5a9e9e;
    box-shadow: 0 0 0 3px rgba(90, 158, 158, 0.15);
}

.form-group input::placeholder {
    color: #6a6a7e;
}

/* Alert / Error */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(190, 60, 60, 0.15);
    color: #f0a0a0;
    border: 1px solid rgba(190, 60, 60, 0.3);
}

.alert-success {
    background: rgba(74, 222, 128, 0.1);
    color: #6ee7a0;
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.alert-info {
    background: rgba(90, 158, 158, 0.1);
    color: #7ec4c4;
    border: 1px solid rgba(90, 158, 158, 0.25);
}

.alert-info a {
    color: #7ec4c4;
    text-decoration: underline;
}

/* Key display */
.key-box {
    background: #333346;
    border: 1px solid #4a4a5e;
    border-radius: 8px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
    margin-bottom: 8px;
    position: relative;
    color: #d0d0e0;
}

.key-container {
    margin-bottom: 16px;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #4a8c8c;
    color: #f0f0f0;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

.btn-copy:hover {
    background: #6ab0b0;
}

.btn-copy.copied {
    background: #3d8b5e;
}

/* Progress bar */
.progress-bar {
    background: #333346;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: #4a8c8c;
    transition: width 0.3s;
}

.progress-fill.warning {
    background: #c89040;
}

.progress-fill.danger {
    background: #be3c3c;
}

.progress-text {
    font-size: 0.85rem;
    color: #a0a0b0;
}

/* Status badges */
.status-active {
    color: #6ee7a0;
    font-weight: 600;
}

.status-expired {
    color: #f0a0a0;
    font-weight: 600;
}

.status-trial {
    color: #c8a050;
    font-weight: 600;
}

/* Info list */
.info-list {
    list-style: none;
    margin-bottom: 16px;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #4a4a5e;
    font-size: 0.95rem;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list .label {
    color: #a0a0b0;
}

.info-list .value {
    font-weight: 500;
}

/* Setup instructions */
.setup-section {
    margin-top: 24px;
}

.setup-section h2 {
    margin-bottom: 16px;
}

.setup-step {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.setup-step .step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #4a8c8c;
    color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.setup-step .step-text {
    font-size: 0.95rem;
    padding-top: 3px;
}

.setup-step a {
    color: #5a9e9e;
    text-decoration: none;
}

.setup-step a:hover {
    text-decoration: underline;
}

/* Hidden helper */
.hidden {
    display: none !important;
}

/* Order summary */
.order-summary {
    background: #333346;
    border: 1px solid #4a4a5e;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.order-summary .plan-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.order-summary .plan-details {
    color: #a0a0b0;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.order-summary .plan-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #7ec4c4;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #4a4a5e;
    border-top-color: #5a9e9e;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Waiting state */
.waiting {
    text-align: center;
    padding: 32px 0;
}

.waiting p {
    color: #a0a0b0;
    font-size: 0.95rem;
}

/* Platform tabs */
.platform-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.platform-tab {
    padding: 6px 12px;
    border: 1px solid #4a4a5e;
    border-radius: 6px;
    background: #333346;
    cursor: pointer;
    font-size: 0.85rem;
    color: #a0a0b0;
    transition: all 0.15s;
}

.platform-tab:hover {
    border-color: #5a9e9e;
    color: #5a9e9e;
}

.platform-tab.active {
    background: #4a8c8c;
    color: #f0f0f0;
    border-color: #4a8c8c;
}

.platform-content {
    display: none;
}

.platform-content.active {
    display: block;
}

/* Feature list */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.95rem;
    color: #d0d0e0;
}

.feature-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #6ee7a0;
    font-weight: 700;
}

/* Tariff info on landing */
.tariff-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tariff-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a4a5e;
}

.tariff-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tariff-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

.tariff-desc {
    font-size: 0.85rem;
    color: #a0a0b0;
    text-align: right;
}
