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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1d2e;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 600px;
    width: 100%;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.card h3 {
    color: #555;
    margin: 30px 0 20px;
    font-size: 1.2rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #0091EA;
}

.hint {
    display: block;
    color: #999;
    font-size: 0.85rem;
}

.info-message {
    background: #e3f2fd;
    border-left: 4px solid #0091EA;
    padding: 12px 16px;
    margin: 10px 0 20px 0;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #333;
    margin-top: 5px;
}

.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #0091EA;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 145, 234, 0.4);
    background: #0081D5;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    width: auto;
    padding: 10px 20px;
}

.btn-secondary:hover {
    background: #0091EA;
    color: white;
}

.btn-link {
    background: transparent;
    color: #0091EA;
    text-decoration: none;
    margin-top: 20px;
}

.btn-link:hover {
    text-decoration: underline;
}

.error-msg {
    color: #e74c3c;
    margin-top: 15px;
    padding: 12px;
    background: #fee;
    border-radius: 6px;
    display: none;
}

.error-msg.show {
    display: block;
}

.sim-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.info-item .label {
    color: #666;
    font-weight: 500;
}

.info-item .value {
    color: #333;
    font-weight: 600;
}

.info-item .value.highlight {
    color: #0091EA;
    font-size: 1.2rem;
}

.iccid-value {
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    color: #444;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
}

.status-active {
    background: #e6f9f0;
    color: #1a7f4e;
}

.status-pending {
    background: #fff8e1;
    color: #b07d00;
}

.status-expired {
    background: #fdecea;
    color: #c0392b;
}

.status-suspended {
    background: #f0f0f0;
    color: #666;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.plan-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.plan-card:hover {
    border-color: #0091EA;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.plan-header h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

.plan-data {
    color: #0091EA;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.plan-price {
    color: #333;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.packages-section {
    margin: 25px 0;
}

.packages-section h3 {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.packages-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 5px 15px;
}

.package-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e0e0e0;
}

.package-item:last-child {
    border-bottom: none;
}

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

.package-type {
    font-size: 0.82rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.package-data {
    font-weight: 700;
    color: #0091EA;
    font-size: 1.1rem;
}

.package-expiry {
    color: #666;
    font-size: 0.88rem;
    text-align: right;
}

.package-expiry.pending {
    color: #b07d00;
    font-style: italic;
}

.no-packages {
    color: #888;
    font-size: 0.95rem;
    padding: 14px 0;
    text-align: center;
}

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-countries {
    background: none;
    border: none;
    color: #0091EA;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 6px 0 0;
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-countries:hover {
    color: #0081D5;
}

.countries-count {
    color: #888;
    font-size: 0.88rem;
    margin: -15px 0 20px;
}

.countries-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 12px;
}

.country-item {
    font-size: 0.88rem;
    color: #444;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

@media (max-width: 480px) {
    .countries-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.help-link {
    background: none;
    border: none;
    color: #0091EA;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 8px;
    padding: 5px 0;
    text-decoration: underline;
    display: inline-block;
}

.help-link:hover {
    color: #0081D5;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.help-content {
    text-align: left;
}

.help-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.help-content h4 {
    color: #0091EA;
    margin-top: 0;
    margin-bottom: 12px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.help-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.help-section p {
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
}

.help-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.help-section li {
    color: #555;
    margin-bottom: 8px;
    line-height: 1.6;
}

.help-section .example {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #0091EA;
    margin-top: 15px;
}

.help-section .example strong {
    color: #0091EA;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .help-section {
        padding: 15px;
    }
}
