/* Subscriptions Page Styles */

.subscriptions-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.subscriptions-page h2 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 24px;
    font-weight: 600;
}

/* Current Subscription Section */
.current-subscription-section {
    margin-bottom: 32px;
}

.current-subscription-section h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 500;
}

.subscription-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.subscription-card.active-subscription {
    border-color: #4a9eff;
}

.subscription-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
}

.subscription-card-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 20px;
}

.subscription-card-header h2 i {
    color: #4a9eff;
}

/* Plan Highlight - Hero Section */
.plan-highlight {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.1) 0%, rgba(74, 158, 255, 0.05) 100%);
    border-radius: 8px;
    margin-bottom: 24px;
}

.plan-highlight.free {
    background: linear-gradient(135deg, rgba(136, 136, 136, 0.1) 0%, rgba(136, 136, 136, 0.05) 100%);
}

.plan-highlight-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.plan-highlight-icon.tier-0 {
    background: linear-gradient(135deg, #555 0%, #333 100%);
    color: #888;
}

.plan-highlight-icon.tier-1 {
    background: linear-gradient(135deg, #4a9eff 0%, #3a8eef 100%);
    color: #fff;
}

.plan-highlight-icon.tier-2 {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #1e1e1e;
}

.plan-highlight-info {
    flex: 1;
}

.plan-highlight-name {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
}

.plan-highlight-type {
    font-size: 14px;
    color: #888;
    margin: 0;
}

.plan-highlight-price {
    text-align: right;
}

.plan-highlight-price .price-main {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.plan-highlight-price .price-period {
    font-size: 16px;
    color: #888;
}

/* Subscription Details Section */
.subscription-details-section {
    margin-bottom: 24px;
}

.subscription-details-section h4,
.plan-benefits-section h4,
.subscription-actions-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    margin: 0 0 16px 0;
    letter-spacing: 0.5px;
}

.subscription-details-section h4 i,
.plan-benefits-section h4 i,
.subscription-actions-section h4 i {
    font-size: 14px;
}

/* Info Grid */
.subscription-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.subscription-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: #252525;
    border-radius: 6px;
}

.subscription-info-item.highlight {
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
}

.subscription-info-item.warning {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.subscription-info-item.caution {
    background: rgba(255, 200, 0, 0.05);
}

.subscription-info-item .info-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subscription-info-item .info-value {
    font-size: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.subscription-info-item .info-value i {
    color: #4a9eff;
}

.subscription-info-item .info-value.monospace {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    color: #aaa;
}

.days-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(74, 158, 255, 0.2);
    color: #4a9eff;
    border-radius: 10px;
    font-weight: 500;
}

.days-badge.urgent {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6464;
}

/* Benefits Section */
.plan-benefits-section {
    margin-bottom: 24px;
    padding: 20px;
    background: #252525;
    border-radius: 8px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-grid li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #ccc;
    padding: 8px 0;
}

.benefits-grid li i {
    color: #4ac864;
    font-size: 14px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #ccc;
    padding: 6px 0;
}

.benefits-list li i {
    color: #4ac864;
}

/* Free Plan Limits */
.free-plan-limits {
    padding: 16px;
    background: rgba(255, 170, 0, 0.05);
    border: 1px solid rgba(255, 170, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 16px;
}

.free-plan-limits p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffaa00;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.limits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.limits-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #888;
    padding: 4px 0;
}

.limits-list li i {
    color: #ff6464;
    font-size: 12px;
}

.upgrade-cta {
    text-align: center;
    padding: 16px;
}

.upgrade-cta p {
    color: #4a9eff;
    font-size: 14px;
    margin: 0;
}

/* Subscription Actions */
.subscription-actions-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #333;
}

.subscription-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.subscription-actions .btn {
    padding: 10px 20px;
}

.cancel-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    margin: 0;
}

.cancel-note i {
    color: #666;
}

/* Alerts */
.subscription-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.subscription-alert.warning {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.subscription-alert.warning > i {
    color: #ffaa00;
    font-size: 20px;
}

.subscription-alert.cancelled-alert {
    background: rgba(136, 136, 136, 0.1);
    border: 1px solid rgba(136, 136, 136, 0.3);
}

.subscription-alert.cancelled-alert > i {
    color: #888;
    font-size: 20px;
}

.subscription-alert.cancelled-alert strong {
    color: #aaa;
}

.subscription-alert strong {
    display: block;
    color: #ffaa00;
    margin-bottom: 4px;
}

.subscription-alert p {
    color: #ccc;
    font-size: 14px;
    margin: 0;
}

/* Notes */
.subscription-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #252525;
    border-radius: 8px;
    margin-bottom: 12px;
}

.subscription-note i {
    font-size: 20px;
    flex-shrink: 0;
}

.subscription-note.prepaid-note i {
    color: #4a9eff;
}

.subscription-note.admin-note i {
    color: #ffd700;
}

.subscription-note span {
    font-size: 14px;
    color: #aaa;
}

/* Tier Badge */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.tier-badge.tier-0 {
    background: rgba(136, 136, 136, 0.2);
    color: #888;
}

.tier-badge.tier-1 {
    background: rgba(74, 158, 255, 0.2);
    color: #4a9eff;
}

.tier-badge.tier-2 {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.subscription-tier {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tier-icon {
    font-size: 24px;
}

.tier-name {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.subscription-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.subscription-status.active {
    background: rgba(74, 158, 255, 0.2);
    color: #4a9eff;
}

.subscription-status.expiring {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
}

.subscription-status.cancelled {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6464;
}

.subscription-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
}

.detail-value {
    color: #fff;
    font-size: 14px;
}

.subscription-actions {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #333;
}

.cancel-btn {
    background: transparent;
    border: 1px solid #ff6464;
    color: #ff6464;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.cancel-btn:hover {
    background: rgba(255, 100, 100, 0.1);
}

.cancel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* No Subscription State */
.no-subscription {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
}

.no-subscription p {
    color: #888;
    font-size: 16px;
    margin-bottom: 16px;
}

.no-subscription .upgrade-cta {
    color: #4a9eff;
    font-size: 14px;
}

/* Available Plans Section */
.available-plans-section {
    margin-bottom: 32px;
}

.available-plans-section h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 500;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.plan-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.plan-card.current {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.05);
}

.plan-header {
    margin-bottom: 16px;
}

.plan-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.plan-tier {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
}

.plan-description {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 16px;
    min-height: 40px;
}

.plan-pricing {
    margin-bottom: 16px;
}

.price-option {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.price-amount {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.price-period {
    font-size: 14px;
    color: #888;
}

.plan-features {
    flex: 1;
    margin-bottom: 20px;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    color: #ccc;
    font-size: 14px;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li i {
    color: #4a9eff;
}

.plan-actions {
    margin-top: auto;
}

.subscribe-btn,
.switch-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.subscribe-btn {
    background: #4a9eff;
    color: #fff;
}

.subscribe-btn:hover {
    background: #3a8eef;
}

.switch-btn {
    background: transparent;
    border: 1px solid #4a9eff;
    color: #4a9eff;
}

.switch-btn:hover {
    background: rgba(74, 158, 255, 0.1);
}

.current-plan-badge {
    width: 100%;
    padding: 12px;
    background: rgba(74, 158, 255, 0.2);
    color: #4a9eff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* Price Selector */
.price-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.price-tab {
    flex: 1;
    padding: 8px 12px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
}

.price-tab.active {
    background: #333;
    border-color: #4a9eff;
    color: #fff;
}

.price-tab:hover:not(.active) {
    background: #333;
}

/* Redeem Section */
.redeem-section {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
}

.redeem-section h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 500;
}

.redeem-section p {
    color: #888;
    font-size: 14px;
    margin-bottom: 16px;
}

.redeem-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.redeem-input {
    flex: 1;
    max-width: 300px;
    padding: 12px 16px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-family: monospace;
    letter-spacing: 1px;
}

.redeem-input::placeholder {
    color: #666;
    letter-spacing: normal;
}

.redeem-input:focus {
    outline: none;
    border-color: #4a9eff;
}

.redeem-btn {
    padding: 12px 24px;
    background: #4a9eff;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.redeem-btn:hover {
    background: #3a8eef;
}

.redeem-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.redeem-message {
    margin-top: 12px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

.redeem-message.success {
    background: rgba(74, 200, 100, 0.1);
    border: 1px solid rgba(74, 200, 100, 0.3);
    color: #4ac864;
}

.redeem-message.error {
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff6464;
}

/* Loading State */
.loading-plans {
    text-align: center;
    padding: 40px;
    color: #888;
}

.loading-plans .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #333;
    border-top-color: #4a9eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .subscriptions-page {
        padding: 16px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .subscription-details {
        grid-template-columns: 1fr;
    }

    .redeem-form {
        flex-direction: column;
    }

    .redeem-input {
        max-width: 100%;
        width: 100%;
    }

    .redeem-btn {
        width: 100%;
    }
}

/* Pricing Options Section */
.plan-pricing-options {
    margin-top: auto;
}

.pricing-section {
    margin-bottom: 16px;
}

.pricing-section:last-child {
    margin-bottom: 0;
}

.pricing-section-header {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-section-header::before,
.pricing-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #333;
}

.plan-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-pricing {
    width: 100%;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.btn-pricing .btn-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-pricing .btn-label i {
    font-size: 14px;
}

.btn-pricing .btn-price {
    font-size: 13px;
    font-weight: 500;
}

.btn-savings {
    font-size: 10px;
    background: rgba(74, 200, 100, 0.2);
    color: #4ac864;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* G2A Gift Card Button Styling */
.btn-giftcard {
    background: #f5a623;
    border: 1px solid #f5a623;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

.btn-giftcard:hover {
    background: #e09620;
    border-color: #e09620;
}

/* Current Plan Button */
.btn-current {
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.3);
    color: #4a9eff;
    cursor: default;
    width: 100%;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

/* Featured Plan Styling */
.plan-card.featured-plan {
    border-color: #ffd700;
    position: relative;
}

.plan-card.current-plan {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.03);
}

.current-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: #4a9eff;
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: #ffd700;
    color: #1e1e1e;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

/* Plan card positioning for badges */
.plan-card {
    position: relative;
}
