/*
 * This is a manifest file that'll be compiled into application.css via Propshaft.
 * Styles declared later override earlier ones depending on specificity.
 */

/* ===================================================================================
// JOSH COMEAU-STYLE DELIGHTFUL ANIMATIONS 🐱
// Spring physics, shimmer, sparkle, bouncy micro-interactions
// =================================================================================== */

/* Spring easing — feels natural and bouncy */
@keyframes springIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.15);
        opacity: 1;
    }
    80% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes springBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    20% {
        transform: translateY(-8px);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
    80% {
        transform: translateY(-1px);
    }
}

/* Shimmer sweep effect */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Playful wiggle on attention */
@keyframes joshWiggle {
    0%,
    100% {
        transform: rotate(0deg);
    }
    15% {
        transform: rotate(-5deg);
    }
    30% {
        transform: rotate(4deg);
    }
    45% {
        transform: rotate(-3deg);
    }
    60% {
        transform: rotate(2deg);
    }
    75% {
        transform: rotate(-1deg);
    }
}

/* Float up like a bubble */
@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse glow — subtle and delightful */
@keyframes pulseGlow {
    0%,
    100% {
        box-shadow: 0 0 8px rgba(255, 140, 66, 0.3);
    }
    50% {
        box-shadow:
            0 0 24px rgba(255, 140, 66, 0.6),
            0 0 48px rgba(255, 60, 127, 0.2);
    }
}

/* Sparkle pop */
@keyframes sparklePop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Staggered fade in for cards */
@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Spring transition utility — apply to interactive elements */
.spring-hover {
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
}

.spring-hover:hover {
    transform: scale(1.06) translateY(-2px);
}

.spring-hover:active {
    transform: scale(0.94);
    transition-duration: 0.1s;
}

/* Shimmer text effect */
.shimmer-text {
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
}

/* Staggered card animations */
.card {
    animation: staggerFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.card:nth-child(1) {
    animation-delay: 0s;
}
.card:nth-child(2) {
    animation-delay: 0.06s;
}
.card:nth-child(3) {
    animation-delay: 0.12s;
}
.card:nth-child(4) {
    animation-delay: 0.18s;
}
.card:nth-child(5) {
    animation-delay: 0.24s;
}
.card:nth-child(6) {
    animation-delay: 0.3s;
}
.card:nth-child(7) {
    animation-delay: 0.36s;
}
.card:nth-child(8) {
    animation-delay: 0.42s;
}

h1 {
    color: rgb(255, 0, 0);
}

h2 {
    background-color: rgb(0, 0, 255);
    font-family: unset;
    font-size: 35px;
}

body {
    background: linear-gradient(180deg, #fff8e1 0%, #ffe0b2 40%, #ffcc80 100%);
    font-family:
        "Segoe UI",
        system-ui,
        -apple-system,
        sans-serif;
    min-height: 100vh;
}

#opti {
    font-family: revert;
    font-size: 20px;
    padding: 10px 16px;
    border: 2.5px solid #ff8c42;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #5a2d0c;
    outline: none;
    cursor: pointer;
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

#opti:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(255, 140, 66, 0.4);
}

#opti:focus {
    border-color: #ff3c7f;
    box-shadow: 0 0 16px rgba(255, 60, 127, 0.3);
}

/*opti to green*/

#green {
    color: rgb(0, 255, 0);
    background-color: rgb(255, 0, 0);
    font-family: monospace;
    font-size: 60px;
}

/*green to plant*/

#history,
#security,
#plant {
    font-size: 24px;
    color: rgb(255, 0, 0);
    font-family: inherit;
    font-weight: bold;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#history:hover,
#security:hover,
#plant:hover {
    transform: scale(1.08) translateY(-2px);
}

/*plant to wild*/

#wild {
    background-color: rgb(0, 255, 0);
    color: rgb(0, 0, 255);
    font-family: cursive;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: joshWiggle 4s ease-in-out infinite;
}

#wild:hover {
    transform: scale(1.2) rotate(-5deg);
}

/*wild to nit!*/

#nit {
    color: rgb(100, 250, 255);
    background-color: rgb(0, 0, 0);
    font-style: italic;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#nit:hover {
    transform: scale(1.15) translateY(-3px);
    text-shadow: 0 0 12px rgba(100, 250, 255, 0.8);
}

/*nit to history*/

/*history to cat*/

#cat {
    margin-bottom: 42px;
    background-color: rgb(0, 0, 255);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    animation: springBounce 2s ease-in-out infinite;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#cat:hover {
    transform: scale(1.15) rotate(-3deg);
}

/*ct tree img*/

#ct-tree {
    background-color: rgb(0, 0, 255);
    padding: 12px;
    border-radius: 12px;
    display: inline-block;
}

#ct-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/*<!--//...!-->*/

#blue {
    color: greenyellow;
    font-family: inherit;
    font-style: oblique;
    font-size: 22px;
    text-decoration: underline;
    line-height: 1.6;
}

/*blue to welcom*/

#welcom {
    color: black;
    font-family: cursive;
    font-size: 48px;
    text-align: center;
    margin: 0 auto;
}

/*welcom to ton*/

#ton {
    color: white;
    font-family: fantasy;
    font-size: 22px;
    padding: 12px 24px;
    border: 3px solid lawngreen;
    outline: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff6b6b, #ff3c7f, #ff1493);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 60, 127, 0.4);
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
    animation: springBounce 3s ease-in-out infinite;
}

#ton:hover {
    transform: scale(1.12) rotate(-5deg);
    box-shadow: 0 0 24px rgba(255, 0, 255, 0.6);
}

#ton:active {
    transform: scale(0.85) rotate(5deg);
    transition-duration: 0.1s;
}

/*ton to reader — accessible high-contrast style for visually impaired*/

#reader {
    background-color: rgb(0, 255, 0);
    font-size: 58px;
    font-family: monospace;
    font-weight: bold;
    color: blue;
    text-decoration: underline;
    border: solid crimson;
    cursor: pointer;
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
}

#reader:hover {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(255, 0, 0, 0.5);
}

#reader:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

/*reader to WARNING*/

.warning {
    background-color: rgba(255, 255, 0, 0.15);
    color: crimson;
    font-family: fantasy;
    font-size: 18px;
    padding: 8px 14px;
    border-radius: 8px;
    border-left: 4px solid crimson;
    animation: joshWiggle 3s ease-in-out infinite;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.warning:hover {
    transform: scale(1.05) translateY(-2px);
}

/*WARNING to ful-page*/

#ful-page {
    display: block;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* ct container layout */

.ct-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Card base styles */

.card {
    padding: 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 140, 66, 0.3);
    box-shadow: 0 4px 20px rgba(255, 140, 66, 0.15);
}

.card-hero {
    text-align: center;
    background: linear-gradient(
        135deg,
        rgba(255, 245, 230, 0.9),
        rgba(255, 224, 178, 0.9)
    );
    border-color: rgba(255, 140, 66, 0.4);
}

.card-note {
    background: rgba(255, 255, 255, 0.8);
}

.card-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.card-facts {
    background: linear-gradient(
        135deg,
        rgba(255, 245, 230, 0.8),
        rgba(255, 204, 128, 0.5)
    );
}

.card-toy {
    text-align: center;
}

.card-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.card-warnings {
    background: rgba(255, 255, 0, 0.08);
    border-color: rgba(220, 20, 60, 0.3);
}

.card-power {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(0, 191, 255, 0.5);
}

/* note input styling */

#note-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2.5px solid #ff8c42;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    box-sizing: border-box;
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

#note-input:focus {
    transform: scale(1.02);
    box-shadow:
        0 0 14px rgba(255, 140, 66, 0.5),
        0 0 28px rgba(255, 60, 127, 0.2);
    border-color: #ff3c7f;
}

#note-input::placeholder {
    color: #cc9966;
    font-style: italic;
}

/* link styling on index */

.card-links a {
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}

.card-links a:hover {
    transform: scale(1.06) translateY(-2px);
}

.card-heading {
    font-size: 22px;
    color: #ff3c7f;
    text-align: center;
    font-weight: bold;
    margin-bottom: 8px;
}

/* link checkbox items */

.link-check-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.link-check {
    width: 20px;
    height: 20px;
    accent-color: #ff3c7f;
    cursor: pointer;
    flex-shrink: 0;
}

.link-check-label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* toy selector image */

#img_opti {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 100%;
    height: auto;
    margin-top: 12px;
}

#img_opti:hover {
    transform: scale(1.04) rotate(-1deg);
}

/* logo image on index */

#helper {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#helper:hover {
    transform: scale(1.06) rotate(-3deg);
}

/* ct tree image */

#ct-img {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ct-img:hover {
    transform: scale(1.03);
}

/* interType button on index */

#inter_type-btn {
    display: block;
    width: 80px;
    margin: 16px auto;
    padding: 10px;
    background: linear-gradient(135deg, #6c5ce7, #a855f7, #ff3c7f);
    background-size: 200% 200%;
    border: 3px solid #a855f7;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
    animation: titleGradient 4s ease-in-out infinite;
}

#inter_type-btn img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: block;
}

#inter_type-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow:
        0 8px 30px rgba(168, 85, 247, 0.6),
        0 0 40px rgba(108, 92, 231, 0.3);
}

#inter_type-btn:active {
    transform: scale(0.92);
    transition-duration: 0.1s;
}

/* logout link */

.card-footer-logout {
    text-align: center;
    padding: 12px 0;
}

#logout-link {
    display: inline-block;
    padding: 12px 32px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
}

#logout-link:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 6px 24px rgba(220, 53, 69, 0.6);
}

#logout-link:active {
    transform: scale(0.94);
    transition-duration: 0.1s;
}

/* responsive */

@media (max-width: 600px) {
    #ful-page {
        padding: 12px;
    }

    .card {
        padding: 16px;
        border-radius: 16px;
    }

    #welcom {
        font-size: 36px;
    }

    #green {
        font-size: 36px;
    }

    #history,
    #security,
    #plant {
        font-size: 20px;
    }

    #blue {
        font-size: 18px;
    }
}

/*...*/

#help {
    color: white;
    font-weight: bold;
    background: linear-gradient(135deg, mistyrose, #ffb3b3);
    border: 3px solid crimson;
    font-size: 28px;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
    animation: pulseGlow 3s ease-in-out infinite;
}

#help:hover {
    transform: scale(1.12) rotate(8deg);
    box-shadow: 0 0 30px rgba(255, 60, 127, 0.5);
}

#help:active {
    transform: scale(0.88) rotate(-8deg);
    transition-duration: 0.1s;
}

/* sr-only helper for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/*login overlay*/

#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a0a2e 0%, #0d0015 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    animation: overlayPulse 4s ease-in-out infinite;
}

@keyframes overlayPulse {
    0%,
    100% {
        background: radial-gradient(
            ellipse at center,
            #1a0a2e 0%,
            #0d0015 100%
        );
    }
    50% {
        background: radial-gradient(
            ellipse at center,
            #2a1a4e 0%,
            #0d0015 100%
        );
    }
}

/*login box*/

#login-box {
    background: linear-gradient(
        135deg,
        #fff5e6 0%,
        #ffe0b2 30%,
        #ffcc80 60%,
        #ffb3b3 100%
    );
    border: 3px solid #ff8c42;
    padding: 44px 40px 36px;
    border-radius: 24px;
    text-align: center;
    min-width: 360px;
    box-shadow:
        0 0 40px rgba(255, 140, 66, 0.4),
        0 0 80px rgba(255, 100, 100, 0.2);
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/*login title*/

#login-title {
    font-size: 38px;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #ff6b35, #ff3c7f, #ff1493, #ff6b35);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation:
        titleBounce 2s ease-in-out infinite,
        titleGradient 4s ease-in-out infinite;
}

@keyframes titleBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-4px);
    }
    75% {
        transform: translateY(2px);
    }
}

@keyframes titleGradient {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/*login subtitle*/

.login-sub {
    font-size: 16px;
    font-style: italic;
    color: #b36b4e;
    margin-top: 0;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in 0.4s both;
}

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

/*login inputs stacked*/

#login-box label {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #d4542e;
    margin-top: 16px;
    text-align: left;
    letter-spacing: 0.5px;
}

#login-user,
#login-email {
    width: 100%;
    padding: 12px 14px;
    font-size: 17px;
    margin-top: 6px;
    border: 2.5px solid #ff8c42;
    border-radius: 12px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.85);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
    outline: none;
}

#login-user:focus,
#login-email:focus {
    transform: scale(1.03);
    box-shadow:
        0 0 14px rgba(255, 140, 66, 0.5),
        0 0 28px rgba(255, 60, 127, 0.2);
    border-color: #ff3c7f;
}

/*login paws*/

.login-paws {
    text-align: center;
    font-size: 30px;
    letter-spacing: 10px;
    margin-top: 22px;
    animation: wiggle 1.5s ease-in-out infinite;
}

@keyframes wiggle {
    0%,
    100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-8deg);
    }
    75% {
        transform: rotate(8deg);
    }
}

/*login button*/

#login-btn {
    margin-top: 14px;
    padding: 13px 36px;
    font-size: 21px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #ff6b6b, #ff3c7f, #ff1493);
    background-size: 200% 200%;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 60, 127, 0.4);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    animation: titleGradient 4s ease-in-out infinite;
}

#login-btn:hover {
    transform: scale(1.07);
    box-shadow:
        0 6px 24px rgba(255, 60, 127, 0.6),
        0 0 40px rgba(255, 107, 107, 0.3);
}

#login-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(255, 60, 127, 0.4);
}

/*login error*/

#login-error {
    color: crimson;
    font-size: 15px;
    margin-top: 12px;
    font-weight: bold;
}

#login-error:not(:empty) {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-8px);
    }
    40% {
        transform: translateX(8px);
    }
    60% {
        transform: translateX(-6px);
    }
    80% {
        transform: translateX(6px);
    }
}

/*login checkbox*/

.login-check {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#cat-love-check {
    width: 20px;
    height: 20px;
    accent-color: #ff3c7f;
    cursor: pointer;
}

.check-label {
    font-size: 17px;
    font-weight: bold;
    color: #d4542e;
    cursor: pointer;
    user-select: none;
}

/*login button disabled*/

#login-btn:disabled {
    background: linear-gradient(135deg, #ccc, #aaa);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#login-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/*login footer*/

.login-footer {
    font-size: 13px;
    font-style: italic;
    color: #b3836e;
    margin-top: 16px;
}

/*power command box*/

#power-box {
    margin-top: 20px;
    padding: 12px;
    border: solid deepskyblue;
    border-radius: 8px;
    background-color: black;
}

#power-input {
    width: 70%;
    padding: 8px;
    font-size: 16px;
    font-family: monospace;
    border: solid lawngreen;
    border-radius: 4px;
    background-color: #111;
    color: lawngreen;
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

#power-input:focus {
    transform: scale(1.03);
    box-shadow:
        0 0 16px rgba(124, 252, 0, 0.5),
        0 0 32px rgba(124, 252, 0, 0.2);
    border-color: #4caf50;
}

#power-btn {
    padding: 8px 16px;
    font-size: 16px;
    font-weight: bold;
    color: black;
    background-color: deepskyblue;
    border: solid deepskyblue;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 6px;
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        background-color 0.2s ease,
        box-shadow 0.3s ease;
}

#power-btn:hover {
    background-color: lawngreen;
    border-color: lawngreen;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 252, 0, 0.5);
}

#power-btn:active {
    transform: scale(0.9);
    transition-duration: 0.1s;
}

#power-output {
    color: lawngreen;
    font-family: monospace;
    font-size: 14px;
    margin-top: 10px;
    white-space: pre-wrap;
}
