/* TelePanel Mini App Styles */
:root {
    /* Light theme defaults */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent: #0088cc;
    --accent-hover: #006699;
    --border: #e0e0e0;
    --success: #34c759;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Dark theme */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-card: #252525;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #00aaff;
    --accent-hover: #0088cc;
    --border: #3a3a3a;
    --shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 440px;
    margin: 0 auto;
    padding: 20px 16px;
    padding-bottom: 100px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 28px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Packages Grid */
.packages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Package Card */
.package-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.package-card:active {
    transform: scale(0.98);
}

.package-card.featured {
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--shadow);
}

/* Badge */
.package-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--text-secondary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-badge.premium {
    background: linear-gradient(135deg, var(--accent), #6366f1);
}

/* Package Name */
.package-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Price */
.package-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 20px;
}

.price-amount {
    font-size: 42px;
    font-weight: 700;
    color: var(--accent);
}

.price-currency {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
}

.price-period {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* Features List */
.package-features {
    list-style: none;
    margin-bottom: 24px;
}

.package-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.package-features li:last-child {
    border-bottom: none;
}

.check {
    color: var(--success);
    font-weight: 700;
    font-size: 16px;
}

/* Buy Button */
.buy-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.buy-button:hover {
    background: var(--accent-hover);
}

.buy-button:active {
    transform: scale(0.97);
}

.arrow {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.buy-button:hover .arrow {
    transform: translateX(4px);
}

/* Enterprise Section */
.enterprise-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.enterprise-section h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.enterprise-section p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.enterprise-link {
    display: inline-block;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.enterprise-link:hover {
    color: var(--accent-hover);
}

/* Footer */
.footer {
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Loading State */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border: 1px solid var(--success);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    z-index: 1000;
    max-width: 320px;
    box-shadow: 0 8px 32px var(--shadow);
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.success-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.success-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.package-card {
    animation: fadeIn 0.4s ease forwards;
}

.package-card:nth-child(2) {
    animation-delay: 0.1s;
}