* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    color: #666;
    font-size: 1.1rem;
}

.input-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

#numberInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    min-width: 200px;
}

#numberInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

#checkButton {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

#checkButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

#checkButton:active {
    transform: translateY(0);
}

.result-section {
    margin-bottom: 30px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-display {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.result-display.show {
    opacity: 1;
    transform: translateY(0);
}

.result-display.prime {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

.result-display.not-prime {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: #333;
    box-shadow: 0 10px 25px rgba(250, 112, 154, 0.3);
}

.result-display.invalid {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.explanation {
    padding: 15px 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.1s;
}

.explanation.show {
    opacity: 1;
    transform: translateY(0);
}

.info-section {
    background: rgba(102, 126, 234, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.info-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-section p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .input-section {
        flex-direction: column;
    }
    
    #numberInput, #checkButton {
        width: 100%;
    }
}

/* Loading animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::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: loading 1s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Number input styling for better UX */
#numberInput::-webkit-outer-spin-button,
#numberInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#numberInput[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Pulse animation for prime numbers */
@keyframes pulse {
    0% {
        box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
    }
    50% {
        box-shadow: 0 10px 40px rgba(79, 172, 254, 0.6);
    }
    100% {
        box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
    }
}

.result-display.prime {
    animation: pulse 2s infinite;
}