@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    min-height: 100vh;
    color: #334155;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
}

/* Live Prices Section */
.live-prices {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.live-prices h2 {
    color: #1e293b;
    margin-bottom: 24px;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 600;
}

.price-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
}

.price-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.coin-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    flex: 1;
    text-align: left;
    line-height: 1.2;
}

.coin-price {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    flex: 1;
    text-align: center;
}

.coin-change {
    font-size: 0.9rem;
    font-weight: 500;
}

.positive {
    color: #059669;
    background: #d1fae5;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    flex-shrink: 0;
}

.price-up {
    border-left: 4px solid #059669;
}

.price-up .positive {
    color: #059669;
    background: #d1fae5;
}

.price-down {
    border-left: 4px solid #dc2626;
}

.price-down .positive {
    color: #dc2626;
    background: #fee2e2;
}

.price-same {
    border-left: 4px solid #6b7280;
}

.price-same .positive {
    color: #6b7280;
    background: #f3f4f6;
}

.negative {
    color: #dc2626;
    background: #fee2e2;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.loading-message {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 500;
}

.error-card {
    opacity: 0.6;
    border-color: #fecaca;
}

.error-card .coin-price {
    color: #6b7280;
    font-style: italic;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

h2 {
    color: #1e293b;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
}

input:not([type="checkbox"]), select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    font-size: 1rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    accent-color: #3b82f6;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.alert-item:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.alert-info {
    color: #374151;
}

.alert-info strong {
    color: #1e293b;
    font-weight: 600;
}

.alert-info small {
    color: #6b7280;
    display: block;
    margin-top: 4px;
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.plan-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.plan-status {
    color: #1e293b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.lifetime-stats {
    color: #7c3aed;
    font-weight: 500;
    font-size: 0.85rem;
}

.active-stats {
    color: #0891b2;
    font-weight: 500;
    font-size: 0.85rem;
}

.limit-warning {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.85rem;
    background: #fee2e2;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.remaining {
    color: #059669;
    font-weight: 600;
    font-size: 0.85rem;
    background: #d1fae5;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    margin-right: 6px !important;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    accent-color: #3b82f6;
    border: 1px solid #d1d5db !important;
    border-radius: 3px !important;
    background: #ffffff !important;
    vertical-align: middle;
}

.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    margin-top: 10px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    header {
        padding: 24px 16px;
        margin-bottom: 24px;
    }
    
    header h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    header p {
        font-size: 0.95rem;
    }
    
    .live-prices {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .live-prices h2 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    
    .price-grid {
        gap: 6px;
    }
    
    .price-card {
        padding: 10px;
        min-height: 45px;
        border-radius: 6px;
    }
    
    .coin-name {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .coin-price {
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .positive {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    
    main {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    section {
        padding: 20px;
    }
    
    h2 {
        font-size: 1.3rem;
        margin-bottom: 16px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    input, select {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 8px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .checkbox-group {
        gap: 4px;
    }
    
    .checkbox-group label {
        font-size: 0.8rem;
        gap: 4px;
    }
    
    .checkbox-group input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }
    
    button {
        padding: 16px 20px;
        font-size: 1rem;
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .alert-item {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .alert-info {
        width: 100%;
    }
    
    .delete-btn {
        align-self: flex-end;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .plan-info {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .plan-status {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .lifetime-stats, .active-stats {
        font-size: 0.8rem;
    }
    
    .limit-warning, .remaining {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
}

/* Pricing Page Styles */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.pricing-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.pricing-card.popular {
    border-color: #3b82f6;
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 16px;
    font-weight: 600;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
}

.price span {
    font-size: 1rem;
    color: #64748b;
    font-weight: 400;
}

.features {
    list-style: none;
    padding: 0;
    margin-bottom: 32px;
}

.features li {
    padding: 8px 0;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

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

.features li:before {
    content: '✓';
    color: #059669;
    font-weight: bold;
    margin-right: 8px;
}

.current-plan {
    background: #6b7280 !important;
    cursor: not-allowed;
}

.faq-section {
    margin-top: 60px;
    padding: 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 32px;
    color: #1e293b;
}

.faq-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h4 {
    color: #1e293b;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.faq-item p {
    color: #64748b;
    line-height: 1.6;
}

.back-link {
    text-align: center;
    margin-top: 40px;
}

.back-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #1d4ed8;
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .pricing-card {
        padding: 24px;
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .price {
        font-size: 2.5rem;
    }
    
    .faq-section {
        padding: 24px;
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    header {
        padding: 16px 12px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .live-prices {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .live-prices h2 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    /* Better mobile scrolling */
    .price-grid {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .price-grid {
        gap: 4px;
    }
    
    .price-card {
        padding: 8px;
        min-height: 44px;
        border-radius: 6px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .coin-name {
        font-size: 0.75rem;
        line-height: 1.1;
        word-break: break-word;
    }
    
    .coin-price {
        font-size: 0.8rem;
        text-align: center;
        font-weight: 600;
    }
    
    .positive {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    section {
        padding: 12px;
    }
    
    .alert-item {
        padding: 10px;
    }
    
    .pricing-card {
        padding: 16px;
    }
    
    .price {
        font-size: 1.8rem;
    }
    
    .faq-section {
        padding: 12px;
    }
    
    /* Mobile-specific optimizations */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    input[type="number"] {
        -moz-appearance: textfield;
    }
    
    input[type="number"]::-webkit-outer-spin-button,
    input[type="number"]::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
}