html{
    background: linear-gradient(135deg, #008cff, #653cfc, #cc00ff);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

footer {
    margin-top: auto;
}

#nav{
    text-align: right;
    display: inline;
    list-style: none;
    margin-left: auto;
    margin-right: 50px;
}

#nav li {
    margin-right: 10px;
    display: inline;
}

#nav li a{
    color: rgb(255, 255, 255);
    text-decoration: none;
    font-size: 1.3em;
}

#nav li a:hover{
    color: rgb(255, 255, 255);
    text-decoration: underline;
    font-size: 1.3em;
}

.header-box{
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border:none;
    background-color: black;
}

#logo {
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin: 0;
    margin-left: 20px;
}

#logo span {
    background: linear-gradient(100deg, #008cff, #653cfc, #cc00ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

footer{
    display: block;
    background-color: black;
    color: white;
    text-align: center;
    font-size: 1.4em;
    margin-top: auto;
    padding: 5px;
}

.main-text{
    color: rgb(253, 253, 253);
    font-size: 4em;
    font-weight: bolder;
    margin: 5px 20px 0px;
    font-family: Arial, Helvetica, sans-serif;
}

.main-text #span{
    background: linear-gradient(100deg, #008cff, #653cfc, #cc00ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Poppins', sans-serif;
}

.main-text span{
    font-family: 'Poppins', sans-serif;
}

 .hero-box{
        background-color: black;
        margin:10px 20px 20px;
        border-radius: 15px;
    }

    .hero-box2{
        background-color: black;
        margin:5px;
        border: 3px solid transparent;
        border-radius: 12px;
        background:
            linear-gradient(black, black) padding-box,
            linear-gradient(90deg, #008cff, #8738ff) border-box;
    }

.par{
    color:white;
    margin-left:20px;
    margin-top:0px;
    font-size: 1.4em;
}

.sub-text{
    color: white;
    margin: 14px 20px;
    font-size: 3em;
}

#spin-bttn{
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;
    border: 1px solid rgb(255, 255, 255);
    background-color: black;
    background: linear-gradient(131deg, #008cff, #e100ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Poppins', sans-serif;
    width: 400px;
    height: 50px;
    font-size: 2em;
    margin-bottom:20px;
}

#spin-bttn:hover{
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;
    border: 1px solid rgb(255, 255, 255);
    background-color: black;
    background: linear-gradient(131deg, #f700ff, #7700ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Poppins', sans-serif;
    width: 400px;
    height: 50px;
    font-size: 2em;
    cursor: pointer;
}

/* Pointless lottery wheel */
.lottery {
    text-align: center;
    color: white;
    padding: 14px 12px 0;
}

.lottery h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 16px;
}

.wheel-wrap {
    position: relative;
    width: min(340px, 82vw);
    margin: auto;
}

.wheel {
    display: block;
    width: 100%;
    height: auto;
    transform-origin: 50% 50%;
}

.wheel-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 19px solid transparent;
    border-right: 19px solid transparent;
    border-top: 42px solid white;
    filter: drop-shadow(0 3px 2px #0008);
}

#lottery-status {
    min-height: 26px;
    margin: 18px 0 12px;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Keep the last frame, so the wheel never snaps back. */
.spinning .wheel {
    animation: wheel-spin 6.5s cubic-bezier(0.13, 0.78, 0.12, 1) forwards;
}

@keyframes wheel-spin {
    to {
        transform: rotate(5040deg);
    }
}

/* Winner announcement */
.winner {
    display: none;
    max-width: 430px;
    margin: 10px auto 20px;
    padding: 20px 12px;
    background: linear-gradient(135deg, #101a37, #28164b);
    border: 2px solid #8d75ff;
    border-radius: 14px;
    box-shadow: 0 0 28px #653cfc88;
}

.winner strong {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 1.7rem;
}

.winner small {
    display: block;
    color: #c8c4ff;
    margin-top: 8px;
}

.won .winner {
    display: block;
    animation: winner-appear 0.7s ease-out;
}

@keyframes winner-appear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
} 


/* Stuff page: same two-layer box design as the hero */
.stuff-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 20px;
    align-items: stretch;
}

.stuff-card {
    min-width: 0;
    background-color: black;
    border-radius: 15px;
    display: flex;
}

.stuff-card-inner {
    flex: 1;
    min-width: 0;
    margin: 5px;
    padding: 22px;
    color: white;
    border: 3px solid transparent;
    border-radius: 12px;
    background:
        linear-gradient(black, black) padding-box,
        linear-gradient(90deg, #008cff, #8738ff) border-box;
}

.stuff-card h2 {
    margin: 0 0 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.45rem;
}

.stuff-card-inner > p {
    min-height: 3.5em;
    margin: 0 0 20px;
    color: #ccc9ec;
    line-height: 1.6;
}

.stuff-card button,
.stuff-card input {
    box-sizing: border-box;
    font: inherit;
}

.stuff-card button {
    cursor: pointer;
    border: 1px solid #7468c2;
    border-radius: 8px;
    color: white;
    background: #1d1a36;
}

.stuff-card button:hover:not(:disabled) {
    background: #342a70;
}

.stuff-card button:focus-visible,
.stuff-card input:focus-visible {
    outline: 2px solid #49c0ff;
    outline-offset: 3px;
}

.stuff-card button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.tool-message {
    min-height: 2.5em;
    color: #c8c4ff;
    text-align: center;
    line-height: 1.5;
}

/* Calculator */
.calculator {
    max-width: 340px;
    margin: 0 auto;
}

#calc-display {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #69629e;
    border-radius: 8px;
    color: white;
    background: #14152a;
    text-align: right;
    font-size: 2rem;
}

.calculator-keys {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.calculator-keys button {
    min-height: 55px;
    font-size: 1.25rem;
}

.calculator-keys .calc-zero {
    grid-column: span 3;
}

.calculator-keys .calc-operation,
.calculator-keys .calc-special {
    background: #30225f;
}

.calculator-keys .calc-equals,
.tool-button {
    background: linear-gradient(115deg, #007cf0, #8239f6) !important;
}

/* Progress Generator */
.progress-gauge {
    --progress: 0%;
    width: 168px;
    height: 168px;
    margin: 6px auto 24px;
    padding: 10px;
    border-radius: 50%;
    background: conic-gradient(#008cff, #8738ff var(--progress), #24203d var(--progress));
    box-shadow: 0 0 22px #653cfc55;
}

.progress-gauge-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 50%;
    background: #101021;
}

.progress-gauge-center strong {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
}

.progress-gauge-center small {
    color: #bab2e8;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #ddd9fa;
}

.status-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #8846f4;
    box-shadow: 0 0 10px #8846f4;
}

.progress-track {
    height: 20px;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid #6e5aaf;
    background: #191628;
}

#progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #008cff, #8738ff, #cc00ff);
    transition: width 0.12s linear;
}

.tool-button {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 22px;
    padding: 10px;
    font-weight: bold !important;
}

/* Decision Maker */
.decision-panel label {
    display: block;
    margin-bottom: 10px;
    color: #ddd9fa;
}

#decision-question {
    width: 100%;
    padding: 13px;
    border: 1px solid #69629e;
    border-radius: 8px;
    background: #14152a;
    color: white;
}

.decision-orb {
    display: grid;
    place-items: center;
    width: 140px;
    height: 140px;
    margin: 23px auto 10px;
    border: 3px solid #b496ff;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 25%, #6654d6, #242158 65%, #0b122c);
    box-shadow: 0 0 25px #653cfc80, inset 0 0 20px #008cff66;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 4rem;
    transition: transform 0.5s ease;
}

.decision-orb.thinking {
    animation: thinking 0.7s ease-in-out infinite alternate;
}

@keyframes thinking {
    to {
        transform: rotate(12deg) scale(1.06);
    }
}

.decision-caption {
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: #bab2e8;
}

.decision-result {
    display: grid;
    place-items: center;
    min-height: 62px;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #453a73;
    border-radius: 10px;
    background: #151329;
    text-align: center;
    font-weight: bold;
    color: #e6dcff;
}

.decision-result.decided {
    font-family: 'Poppins', sans-serif;
    font-size: 1.7rem;
    color: #d8c0ff;
    box-shadow: 0 0 16px #653cfc44;
}

/* Keep all tools usable on smaller screens */
@media (max-width: 1050px) {
    .stuff-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stuff-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 650px) {
    .stuff-grid {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
        gap: 14px;
    }

    .stuff-card-inner {
        padding: 18px;
    }

    .stuff-card:last-child {
        grid-column: auto;
    }

    .header-box {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 8px;
        padding: 12px;
    }

    #logo {
        margin: 0;
        font-size: clamp(1.5rem, 7vw, 2.25rem);
    }

    #nav {
        margin: 0;
        padding: 0;
    }

    .main-text {
        font-size: clamp(1.9rem, 8vw, 4rem);
    }

    #spin-bttn {
        max-width: calc(100% - 24px);
    }
}
