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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(30, 30, 45, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.controls {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

label {
    font-weight: 600;
    margin-right: 10px;
    color: #b8b8d1;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    background: rgba(45, 45, 68, 0.8);
    color: #e0e0e0;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

select:hover {
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(45, 45, 68, 1);
}

select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

thead th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.8px;
}

tbody tr {
    background: rgba(45, 45, 68, 0.6);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tbody tr:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: scale(1.01);
}

tbody tr:last-child {
    border-bottom: none;
}

tbody td {
    padding: 15px;
    color: #d0d0e0;
    font-size: 0.95em;
}

input[type="number"] {
    width: 100px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    background: rgba(30, 30, 45, 0.8);
    color: #e0e0e0;
    font-size: 1em;
    transition: all 0.3s ease;
    outline: none;
}

input[type="number"]:hover {
    border-color: rgba(102, 126, 234, 0.6);
}

input[type="number"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background: rgba(30, 30, 45, 1);
}

/* Remove spinner arrows */
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;
}

.gp-cell {
    font-weight: 700;
    font-size: 1.1em;
    color: #667eea;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

button {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 30px auto;
    padding: 16px 32px;
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

button:active {
    transform: translateY(0);
}

#result {
    text-align: center;
    margin-top: 30px;
    font-size: 1.8em;
    font-weight: 700;
    color: #fff;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.6em;
    }
    
    .controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    table {
        font-size: 0.9em;
    }
    
    thead th,
    tbody td {
        padding: 10px 8px;
    }
    
    input[type="number"] {
        width: 80px;
        padding: 8px;
    }
    
    #result {
        font-size: 1.4em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.4em;
    }
    
    table {
        font-size: 0.8em;
    }
    
    thead th,
    tbody td {
        padding: 8px 5px;
    }
}


/* GitHub Link Styling */
.github-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.github-link a {
    text-decoration: none;
    color: #586069;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.github-link a:hover {
    color: #0366d6; /* GitHub Blue */
    text-decoration: underline;
}
