@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@300;400&display=swap');

:root {
    --bg-dark: #0b0c15;
    --glass: rgba(255, 255, 255, 0.05);
    --neon-cyan: #00f3ff;
    --neon-purple: #bc13fe;
    --text-main: #ffffff;
    --text-dim: #a0a0b0;
}

body {
    background-color: var(--bg-dark);
    /* Simple starfield effect or dark gradient */
    background-image: radial-gradient(circle at 50% 0%, #1a1c2e 0%, var(--bg-dark) 80%);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1, h2, h3 {
    max-width: 100%;
    overflow-wrap: break-word; /* Prevents overflow */
    hyphens: auto; /* Adds hyphen if word breaks */
    font-size: clamp(1.2rem, 5vw, 2rem); /* Dynamic resizing */
}
/* The Glass Card Container */
.container {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    margin-top: 5vh;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

/* Inputs */
input[type="text"], input[type="number"], select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--neon-cyan);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box; /* Fixes padding issues */
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.logo-area {
    text-align: center;
    margin-bottom: 20px;
}

.logo-area span {
    display: block;
    color: var(--neon-cyan);
    font-size: 0.9rem;
    letter-spacing: 4px;
}
/* 1. The "Processing" Overlay */
.loader-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(11, 12, 21, 0.9); /* Dark background */
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 243, 255, 0.1);
    border-top: 4px solid var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px var(--neon-cyan);
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.loading-text {
    margin-top: 20px;
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}

/* 2. Fix the Certificate Preview (Make it Full Width) */
#finalImage {
    display: none;
    width: 100%;       /* Take full width of phone screen */
    height: auto;      /* Maintain aspect ratio (don't stretch) */
    max-width: 800px;  /* Limit size on desktop */
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    margin-top: 20px;
}