/* 
Disclaimer: 
Most of this CSS file was written by Google Gemini, I've only done some finishing touches here.
*/

/* --- UNSEEN UNIVERSITY: HIGH MAGIC THEME --- */
@import url('https://fonts.googleapis.com/css2?family=Almendra+Display&family=MedievalSharp&display=swap');

body {
    background: radial-gradient(circle at center, #3d1b5c 0%, #1a0a24 100%);
    color: #fdf6e3;
    font-family: 'MedievalSharp', cursive;
    /* Subtle magical "sparkle" background */
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
}

/* The Main UI Panel: The 'Wizard's Lectern' */
.container {
    background: linear-gradient(135deg, #3d1b5c 0%, #4b2161 100%);
    border: 4px solid #ffcc33;
    border-radius: 15px;
    /* This creates the 'Octarine' aura around the calculator */
    box-shadow: 0 0 30px rgba(125, 249, 255, 0.3), 
                0 0 60px rgba(255, 0, 255, 0.2),
                inset 0 0 15px rgba(255, 204, 51, 0.5);
    padding: 2.5rem;
    position: relative;
}

/* Headers: Each one looks like a spell incantation */
h1 {
    font-family: 'Almendra Display', serif;
    font-size: 3.5rem;
    background: linear-gradient(90deg, #ffcc33, #7df9ff, #ff00ff, #ffcc33);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: magic-shine 5s linear infinite;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

/* The Inputs: Vellum Scrolls */
input[type="number"], input[type="text"], select {
    background: #fffcf2 !important;
    color: #2b1038 !important;
    border: 3px solid #5d3a1a !important; /* Leather-like border */
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 3px 3px 0px #2d1b33;
}

input:focus {
    border-color: #ff00ff !important;
    box-shadow: 0 0 15px #7df9ff !important;
    transform: scale(1.02);
}

/* Magical "Sparkle" Animation */
@keyframes magic-shine {
    to { background-position: 200% center; }
}

/* Buttons: The 'Silver Star' Style */
.btn-primary {
    /* A darker, richer gradient so the white/gold text actually stands out */
    background: linear-gradient(135deg, #4b2161 0%, #2b1038 100%) !important;
    border: 2px solid #ffcc33 !important;
    color: #ffcc33 !important; /* Gold text */
    
    font-family: 'Almendra Display', serif;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    
    /* This shadow acts as a dark border around each letter */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 
                 0 0 10px rgba(125, 249, 255, 0.4);
    
    padding: 12px 30px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.btn-primary:hover {
    color: #ffffff !important;
    border-color: #7df9ff !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 25px rgba(125, 249, 255, 0.6);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
}

.footnote {
    font-size: 0.8rem;
    color: #b9a6d6;
    border-top: 1px solid #ffcc33;
    padding-top: 5px;
    margin-top: 20px;
    font-style: italic;
    cursor: help;
}

.footnote::before {
    content: "* ";
    color: #ffcc33;
    font-weight: bold;
}

/* --- THE THAUMIC RESULT CARD --- */
.card {
    background: linear-gradient(145deg, #fffcf2, #f4ecd8) !important; /* Vellum color */
    border: 2px solid #ffcc33 !important;
    border-radius: 8px;
    margin-top: 1.5rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    color: #2b1038 !important; /* Dark ink color */
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255, 204, 51, 0.4), 
                4px 4px 0px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: scale(1.03) rotate(1deg);
}

/* The 'Order Seal' in the corner */
.card::before {
    content: "UU"; /* Unseen University Initials */
    position: absolute;
    top: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background: #8b0000;
    color: #ffcc33;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Almendra Display', serif;
    font-size: 1.2rem;
    opacity: 0.8;
    transform: rotate(15deg);
    border: 2px double #ffcc33;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

/* Making the result text itself look 'Calculated' */
.card-body, .card-text {
    font-family: 'Special Elite', monospace;
    font-size: 1.25rem;
    border-left: 3px solid #8b0000;
    padding-left: 15px;
}

@keyframes manifest {
    from { opacity: 0; transform: translateY(20px) scale(0.9); filter: blur(10px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.card {
    animation: manifest 0.5s ease-out forwards;
}

.card.order-hoodwinkers { 
    border-color: #7df9ff !important; box-shadow: 0 0 15px rgba(125, 249, 255, 0.5); 
}
.card.order-widgerylodgers { 
    border-color: #ff0000 !important; box-shadow: 0 0 15px rgba(255, 0, 0, 0.3); 
}

.smol {
    font-size: 10px;
}