/* Enhanced Thaumcraft Research Solver Styling */

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
}

h1 {
    text-align: center;
    color: #7aa8ff;
    font-size: 2.2em;
    margin-bottom: 25px;
    text-shadow: 0 0 20px rgba(122, 168, 255, 0.5),
                 0 0 40px rgba(122, 168, 255, 0.3);
    letter-spacing: 2px;
    animation: fadeIn 0.8s ease-in;
}

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

h2 {
    color: #9db4d4;
    font-size: 1.2em;
    text-shadow: 0 0 10px rgba(122, 168, 255, 0.3);
}

/* Canvas Styling */
#canvas_selector_wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

#canvas {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6),
                inset 0 0 30px rgba(122, 168, 255, 0.1);
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    border: 2px solid rgba(122, 168, 255, 0.2);
    max-width: 500px;
    max-height: 500px;
}

#canvas:hover {
    box-shadow: 0 4px 25px rgba(122, 168, 255, 0.4),
                inset 0 0 30px rgba(122, 168, 255, 0.15);
    border-color: rgba(122, 168, 255, 0.4);
}

/* Responsive canvas sizing */
@media only screen and (min-width: 800px) {
    #canvas_selector_wrapper {
        display: flex;
        flex-wrap: nowrap;
    }
    
    #canvas {
        width: 500px;
        height: 500px;
        flex-shrink: 0;
    }
    
    #aspect_selector_modpack_wrapper {
        flex: 1;
        min-width: 300px;
    }
}

@media only screen and (max-width: 799px) {
    #canvas {
        margin: 0 auto;
        width: 100%;
        max-width: 500px;
        height: auto;
        aspect-ratio: 1;
    }
}

/* Aspect Selector Styling */
#aspect_selector_gui {
    background: rgba(15, 52, 96, 0.2);
    border-color: rgba(122, 168, 255, 0.3);
    border-radius: 8px;
    padding: 10px;
}

#aspect_selector_modpack_wrapper {
    background: rgba(15, 52, 96, 0.15);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(122, 168, 255, 0.2);
    overflow-y: auto;
}

#aspect_selector_modpack_wrapper::-webkit-scrollbar {
    width: 10px;
}

#aspect_selector_modpack_wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

#aspect_selector_modpack_wrapper::-webkit-scrollbar-thumb {
    background: rgba(122, 168, 255, 0.5);
    border-radius: 10px;
    transition: background 0.3s ease;
}

#aspect_selector_modpack_wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(122, 168, 255, 0.7);
}

#aspect_selector_gui::-webkit-scrollbar {
    width: 10px;
}

#aspect_selector_gui::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

#aspect_selector_gui::-webkit-scrollbar-thumb {
    background: rgba(122, 168, 255, 0.5);
    border-radius: 10px;
    transition: background 0.3s ease;
}

#aspect_selector_gui::-webkit-scrollbar-thumb:hover {
    background: rgba(122, 168, 255, 0.7);
}

.aspect_content_wrapper {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(122, 168, 255, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
    padding: 8px;
}

.aspect_content_wrapper:hover {
    background: rgba(122, 168, 255, 0.1);
    border-color: rgba(122, 168, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 168, 255, 0.2);
}

.aspect_content_wrapper img {
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(122, 168, 255, 0.3));
}

.aspect_content_wrapper:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(122, 168, 255, 0.6));
}

.aspect_text_wrapper {
    color: #d0d0d0;
}

.aspect_text_wrapper:hover {
    text-shadow: 0 0 10px #7aa8ff;
    color: #ffffff;
}

/* Search and Modpack Selector */
#aspect_selector_modpack_wrapper {
    background: rgba(15, 52, 96, 0.15);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(122, 168, 255, 0.2);
}

#search_wrapper label {
    color: #9db4d4;
    font-weight: 500;
    text-shadow: 0 0 5px rgba(122, 168, 255, 0.3);
}

#search_box {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(122, 168, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    color: #e8e6e3;
    transition: all 0.3s ease;
}

#search_box:focus {
    outline: none;
    border-color: #7aa8ff;
    box-shadow: 0 0 15px rgba(122, 168, 255, 0.4);
    background: rgba(0, 0, 0, 0.5);
}

#modpack_selector {
    margin-top: 10px;
}

.input_wrapper {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding: 6px 10px;
    margin: 4px;
    border: 1px solid rgba(122, 168, 255, 0.2);
    transition: all 0.3s ease;
}

.input_wrapper:hover {
    background: rgba(122, 168, 255, 0.1);
    border-color: rgba(122, 168, 255, 0.4);
    transform: translateX(3px);
}

.input_wrapper input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #7aa8ff;
}

.input_wrapper label {
    cursor: pointer;
    color: #d0d0d0;
    transition: color 0.3s ease;
}

.input_wrapper:hover label {
    color: #ffffff;
}

/* Buttons */
.myButton {
    background: linear-gradient(to bottom, #2a5298 5%, #1e3c72 100%);
    background-color: #2a5298;
    border: 2px solid rgba(122, 168, 255, 0.4);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: inset 0px 1px 0px 0px rgba(122, 168, 255, 0.3),
                0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.myButton:hover {
    background: linear-gradient(to bottom, #3a62b8 5%, #2a5298 100%);
    background-color: #3a62b8;
    border-color: #7aa8ff;
    box-shadow: inset 0px 1px 0px 0px rgba(122, 168, 255, 0.5),
                0 6px 20px rgba(122, 168, 255, 0.4);
    transform: translateY(-2px);
}

.myButton:active {
    transform: translateY(0);
    box-shadow: inset 0px 1px 0px 0px rgba(122, 168, 255, 0.3),
                0 2px 10px rgba(0, 0, 0, 0.3);
}

#barring_button {
    transition: all 0.3s ease;
}

/* Form Inputs */
.css-input {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(122, 168, 255, 0.3);
    color: #e8e6e3;
    box-shadow: 0px 0px 8px rgba(122, 168, 255, 0.2);
    text-shadow: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.css-input:focus {
    outline: none;
    border-color: #7aa8ff;
    box-shadow: 0 0 15px rgba(122, 168, 255, 0.4);
    background-color: rgba(0, 0, 0, 0.5);
}

form label {
    color: #9db4d4;
    text-shadow: 0 0 5px rgba(122, 168, 255, 0.3);
}

/* Instructions List */
ul li {
    transition: all 0.3s ease;
    border-left: 3px solid rgba(122, 168, 255, 0.5);
    padding-left: 15px;
    margin: 8px 0;
}

ul li:hover {
    border-left-color: #7aa8ff;
    transform: translateX(5px);
    color: #ffffff;
}

ul li::before {
    content: "➤ ";
    color: #7aa8ff;
    font-weight: bold;
    margin-right: 8px;
    text-shadow: 0 0 8px rgba(122, 168, 255, 0.6);
}

/* Loading and Status Messages */
#loading, #wait_solving {
    text-align: center;
    color: #7aa8ff;
    font-size: 1.1em;
    padding: 12px;
    background: rgba(122, 168, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(122, 168, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(122, 168, 255, 0.5);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 10px rgba(122, 168, 255, 0.3);
    }
    50% { 
        opacity: 0.7;
        box-shadow: 0 0 20px rgba(122, 168, 255, 0.5);
    }
}

/* Glow animation for special effects */
@keyframes glow {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3),
                    0 0 5px rgba(122, 168, 255, 0.5);
    }
    50% { 
        box-shadow: 0 6px 20px rgba(122, 168, 255, 0.4),
                    0 0 20px rgba(122, 168, 255, 0.8);
    }
}

.myButton:hover {
    animation: glow 1.5s ease-in-out infinite;
}