* {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    font-family: 'Rajdhani', 'Roboto', sans-serif;
}

body {
    -webkit-touch-callout: none;
    -webkit-text-size-adjust: none;
    -webkit-user-select: none;
    background-color: #0d1117;
    background-image: radial-gradient(circle at top right, #1a2332, #0d1117 70%);
    color: #e0e6ed !important;
    background-attachment: fixed;
}

body, a {
    color: #e0e6ed !important;
}

/* Splashscreen */
#splashscreen {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 1000;
    background-image: radial-gradient(circle at center, #1a2332, #000000);
    transition: .6s ease;
}
.hideSplash { opacity: 0; pointer-events: none; }

/* Header and Drawer */
.mdl-layout__header {
    background-color: rgba(13, 17, 23, 0.8) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.mdl-layout__drawer {
    background-color: rgba(20, 25, 35, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255,255,255,0.05);
    color: #fff;
}

.mdl-layout-title {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(77, 160, 193, 0.8);
    padding: 20px !important;
}

.mdl-layout__drawer .mdl-navigation__link {
    color: #b0c4de !important;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.mdl-layout__drawer .mdl-navigation__link:hover {
    background-color: rgba(255,255,255,0.05) !important;
    color: #fff !important;
    border-left: 4px solid #4da0c1;
    text-shadow: 0 0 8px rgba(77, 160, 193, 0.8);
}

/* Glassmorphism Cards */
.mdl-card { 
    margin: 15px auto;
    /* Background is injected by JS (variables-swapi), so we use a translucent base here */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    color: #e0e6ed;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.mdl-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6), 0 0 20px rgba(77, 160, 193, 0.3);
    border-color: rgba(77, 160, 193, 0.5);
}

.mdl-card__media { 
    background-color: transparent !important; 
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mdl-card__actions { 
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mdl-card__supporting-text { 
    border-top: 1px solid rgba(255,255,255,0.1); 
    color: #b0c4de !important;
    width: 100% !important;
    box-sizing: border-box;
    font-size: 1.1rem;
}

/* Typography in cards */
.mdl-card__title-text {
    font-weight: 700;
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

/* Responsive Grid Container */
#container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding: 25px;
    max-width: 1600px;
    margin: 0 auto;
    box-sizing: border-box;
}

.demo-card-wide { width: 100%; box-sizing: border-box; } 

/* Images */
img {
    height: 350px;
    object-fit: contain;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

/* Loaders */
#loadingData { display: none !important; position:absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
#loadingResources { display: block; position:absolute; left: 15%; top:60%; color:#ffffff; width:70%; }
.progressbar.bar.bar1 { background-color: rgb(255,247,10) !important; box-shadow: 0 0 10px rgb(255,247,10); }

/* Helpers */
.textJustify { text-align: justify; }
.textCenter { text-align: center !important; }
.textLeft { text-align: left !important; }
.textRight { text-align: right !important; }
.padding0 { padding-top:0 !important;}
.ulCharacter, .ulVideo, .ulPlanets, .ulSpecies, .ulStarships, .ulVehicles { margin: 0 0 0 30px; }
.customTable { width: calc(100% - 20px); margin: 10px 0 10px 10px; }

/* Transitions and animations */
.transicion {
    -webkit-transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.submenuClose { transform: rotate(-90deg) !important; }
.mdl-card__supporting-text > ul.demo-list-item.mdl-list > li > i { transform: rotate(0deg); }
.hideSubmenuUL { overflow: hidden; padding: 0; height: 0; display:none; }
.ajustarLI { position: relative; top: -15px; left: 15px; }
.mdl-list__item-avatar, .mdl-list__item-avatar.material-icons { overflow: hidden; }
.iconoStyle { width: 100%; height: 100%; left: 0; top: 0px; position: relative; }

/* Mobile Optimizations */
@media (max-width: 600px) {
    #container {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 15px;
    }
    .mdl-card__title-text {
        font-size: 1.5rem;
    }
    .mdl-layout-title {
        font-size: 1.2rem;
    }
    img {
        height: 250px;
    }
}