/* Modern cosmic effect setup */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

body {
    min-height: 100vh;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

/* Star animation background */
.background {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1a1a 0%, #0a0a0a 100%);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.shapes {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 
        0 0 60px 30px rgba(255, 255, 255, 0.1),
        0 0 100px 60px rgba(255, 255, 255, 0.1),
        0 0 140px 90px rgba(255, 255, 255, 0.05);
    animation: twinkle 3s infinite;
}

.shapes:nth-child(2) {
    width: 3px;
    height: 3px;
    right: 30%;
    top: 40%;
    animation-delay: -1s;
}

.shapes:before {
    content: '';
    position: absolute;
    top: -50vh;
    left: -50vw;
    right: -50vw;
    bottom: -50vh;
    background-image: radial-gradient(2px 2px at 20px 30px, #fff, rgba(0,0,0,0)),
                      radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
                      radial-gradient(2px 2px at 50px 160px, #fff, rgba(0,0,0,0)),
                      radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
                      radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    animation: stars 15s linear infinite;
    opacity: 0.3;
}

@keyframes stars {
    from { transform: translateY(0); }
    to { transform: translateY(-100vh); }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem;
    padding: 2rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
}

.content {
    text-align: center;
}

h1 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
}

.glass-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

.glass-input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.glass-input:invalid:not(:placeholder-shown) {
    border-color: rgba(255, 99, 71, 0.5);
    background: rgba(255, 99, 71, 0.05);
}

.glass-input:valid:not(:placeholder-shown) {
    border-color: rgba(144, 238, 144, 0.5);
    background: rgba(144, 238, 144, 0.05);
}

.generate-btn {
    background: linear-gradient(45deg, #4a90e2, #5f2c82);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.5);
}

.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.feature i {
    color: #4a90e2;
    font-size: 1.2rem;
}

/* Result page styles */
.result-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.success-animation {
    color: #4a90e2;
    margin-bottom: 2rem;
}

.success-animation i {
    font-size: 4rem;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { text-shadow: 0 0 5px rgba(74, 144, 226, 0.5); }
    50% { text-shadow: 0 0 20px rgba(74, 144, 226, 0.8); }
    100% { text-shadow: 0 0 5px rgba(74, 144, 226, 0.5); }
}

.link-display {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.link-display i {
    color: rgba(255, 255, 255, 0.7);
}

.generated-link {
    color: #4a90e2;
    text-decoration: none;
    word-break: break-all;
    flex: 1;
}

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

.expiry-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.expiry-info i {
    color: #4a90e2;
    font-size: 1.2rem;
}

.highlight {
    color: #4a90e2;
    font-weight: 500;
}

.back-btn {
    margin-top: 2rem;
    background: linear-gradient(45deg, #4a90e2, #5f2c82);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.5);
}

/* Input number spinner removal */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container, .result-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .glass-card {
        padding: 2rem;
    }
}