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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-primary);
}

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

header {
    text-align: center;
    margin-bottom: 15px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

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

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

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 18px 24px;
    font-size: 1.15rem;
    border: 4px solid #2563eb;
    border-radius: 12px;
    transition: all 0.3s;
    background-color: #f8fafc;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    background-color: white;
    transform: scale(1.02);
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    min-width: 120px;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-action {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1rem;
    padding: 16px;
    margin-bottom: 12px;
}

.btn-action:hover {
    opacity: 0.9;
}

/* Butonul Rinnova Abbonamento - principal, cu gradient puternic */
.btn-renew {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Butoanele pentru canale - design mai subtil, cu border, mai mici */
.btn-adulti {
    background: white;
    color: #ef4444;
    border: 3px solid #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
    font-size: 0.95rem;
    padding: 12px;
}

.btn-adulti:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
    opacity: 1;
}

.btn-stranieri {
    background: white;
    color: #10b981;
    border: 3px solid #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
    font-size: 0.95rem;
    padding: 12px;
}

.btn-stranieri:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
    opacity: 1;
}

.btn-secondary {
    background: var(--text-primary);
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-secondary:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.action-section {
    margin-bottom: 20px;
}

/* Secțiunile cu butoanele pentru canale - mai apropiate */
.action-section:has(.btn-adulti),
.action-section:has(.btn-stranieri) {
    margin-bottom: 8px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.btn-option {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.btn-option:hover {
    background: var(--primary-color);
    color: white;
}

.btn-option .price {
    font-size: 1.3rem;
    font-weight: 700;
}

.btn-option-toggle {
    background: white;
    border: 2px solid var(--success-color);
    color: var(--success-color);
    padding: 14px 16px;
    font-weight: 600;
}

.btn-option-toggle:hover {
    background: var(--success-color);
    color: white;
}

.btn-option-toggle[data-action="rimuovi"] {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.btn-option-toggle[data-action="rimuovi"]:hover {
    background: var(--danger-color);
    color: white;
}

.user-info {
    background: #f0f9ff;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.expiry-info {
    margin-top: 10px;
    font-size: 1.1rem;
}

.date-badge {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    margin-left: 8px;
}

.error-message {
    color: var(--danger-color);
    background: #fef2f2;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--danger-color);
    margin-top: 12px;
    display: none;
}

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

.success-message {
    color: var(--success-color);
    background: #f0fdf4;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
    margin-top: 12px;
    display: none;
}

.success-message.show {
    display: block;
}

.loading {
    text-align: center;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.9;
}

footer p {
    margin: 8px 0;
}

footer a {
    color: white;
    text-decoration: underline;
}

footer a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 640px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mărește imaginea DOAR pe înălțime pe mobil */
    .credential-example {
        max-height: 500px !important;
        width: auto !important;
        object-fit: contain !important;
        margin: 20px auto !important;
        display: block !important;
    }
}

