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

body { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.header-section {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.controls {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

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

.btn-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 180px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-generate {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.6);
}

.btn-download {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
    transition: all 0.3s ease;
}

.btn-download:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.6);
}

.btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(33, 150, 243, 0.2);
}

.btn-verify {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.4);
    transition: all 0.3s ease;
}

.btn-verify:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.6);
}

.btn-verify:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(156, 39, 176, 0.2);
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff30;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

.card-wrapper {
    perspective: 1000px;
    margin-bottom: 30px;
}

.card {
    width: 650px;
    min-height: 400px;
    background: #fff;
    border: none;
    border-radius: 20px;
    margin: 0 auto 40px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.07);
    overflow: hidden;
    padding-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: cardAppear 0.6s ease-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 8px 20px rgba(0,0,0,0.1);
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    background: linear-gradient(135deg, #6a9ed8, #4a7db8);
    color: #fff;
    padding: 20px 30px 15px 30px;
    position: relative;
    min-height: 90px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcf7f, #4ecdc4, #45b7d1);
}

.logo {
    position: static;
    width: 85px;
    height: 85px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    padding: 6px;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.subtitle {
    color: #ffd700;
    font-size: 22px;
    font-weight: 600;
    margin-top: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.info-section {
    display: flex;
    flex-wrap: wrap;
    padding: 20px 30px 0 30px;
    gap: 25px;
}

.avatar {
    width: 120px;
    height: 145px;
    object-fit: cover;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    background: #f5f5f5;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.details {
    flex: 1;
    font-size: 17px;
    min-width: 250px;
}

.details b {
    font-size: 18px;
    font-weight: 600;
}

.label {
    color: #2c5aa0;
    font-weight: 600;
    display: inline-block;
    min-width: 120px;
}

.row {
    margin-bottom: 10px;
    padding: 5px 0;
    word-break: break-word;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 5px -10px;
}

.row:hover {
    background-color: #f8f9fa;
}

.barcode {
    width: 85%;
    height: 40px;
    margin: 18px auto 0 auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.footer {
    font-size: 15px;
    color: #555;
    text-align: left;
    padding: 0 30px 0 30px;
    margin-top: 15px;
    font-weight: 500;
}

.id-number {
    position: absolute;
    left: 30px;
    bottom: 15px;
    font-size: 14px;
    color: #333;
    background: rgba(255,255,255,0.9);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.region {
    position: absolute;
    right: 30px;
    bottom: 15px;
    font-size: 14px;
    color: #333;
    background: rgba(255,255,255,0.9);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .card {
        width: 100%;
        max-width: 500px;
    }
    
    .btn-container {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .info-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .details {
        text-align: left;
    }
}

/* Loading Animation */
.generating {
    position: relative;
    overflow: hidden;
}

.generating::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.95);
    color: #333;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #4CAF50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification.info {
    border-left: 4px solid #2196F3;
}
