body {
    font-family: sans-serif;
    margin: 10px;
    padding: 0;
    box-sizing: border-box;
    background-color: black;
}

main {
    display: flex;
    flex-direction: column;
    gap: 1em;
    max-width: 650px;
    padding: 1em;
    background-color: wheat;    
    border-radius:10px;
}

table {
    width: 100%;
}

.copy { cursor:pointer; }

.wrapper img {
    width:100%;
    max-width: 650px;
}

img, iframe {
    height: auto;
}

h1 {
    font-size: 1.5em;
}



.link-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.link-buttons a {
    flex: 1 1 40%;
    text-align: center;
    padding: 10px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.link-buttons a:hover {
    background-color: #0056b3;
}

#mediaLink { 
    width: calc(100% - 140px); 
    margin-right: 5px;
    padding: 5px;
    box-sizing: border-box;
}
button {
    padding: 5px 8px;
    cursor: pointer;
    //    background-color: wheat;
    background-color: transparent;
    border-style: none;
}

button:hover {
    opacity: 0.7;
    transform: rotateX(10deg) skewX(30deg);
    transition: all 0.2s ease;
    color:red;
    font-weight:bold;
}

#main {
    margin-top: 10px;
    border: 1px solid black;
    padding: 5px;
    
    max-width: 100%; 
    box-sizing: border-box;
    display: none; 

}
#odeslink {
    margin-bottom: 5px;
    word-break: break-all;
}

#odeslinkMarkdown {
    font-family: courrier;
    fpnt-size: smaller;
}

#odeslinkHtml {
    font-family: courrier;
    fpnt-size: smaller;
}

.gray {
    background-color: lightGray;
}

#iframeWrapper {
    width: 100%;
    resize:both;
    height: 400px; 
    overflow: hidden; 

}

#frame {
    width: 100%;
    height: 100%; 
    border: none;
    display: block;
    overflow: hidden; 
}
.dashicons {
    vertical-align: middle;
}

#title {
    font-weight: bold;
    text-align:center;
    //background-color: lightGray;
}

footer {

}
#footer {
    list-style: none;
    padding: 0;
    padding-top: 2px;
    margin: 0;
    display: flex;
    font-size: smaller;
    gap: 5px;
    perspective: 300px;
    align-items: center;
    
}

#footer li {
    display: inline;
    cursor: pointer;
}

#footer li:hover {
    opacity: 0.7;
    transform: rotateY(10deg) skewX(30deg);
    transition: all 0.2s ease;
}
#footer li {
    transition: all 0.2s ease;
}
#qrcodeWrapper {
    padding: 10px;
}

#toggler { text-align: right;
	   cursor: pointer;

	 }


#settings {
    margin-top: 0px;
    padding-top: 0px;
    text-align:right;
}

#editTitle {
    cursor: pointer;
}


#tplTitle {
    font-weight: bold;
    text-align:center;
}



#varListWrapper ul {
  list-style: none;        /* remove bullet points */
  padding: 0;
  margin: 0;
  display: flex;           /* put items in a row */
  flex-wrap: wrap;         /* allow wrapping if needed */
  gap: 0.5em;              /* space between items */
}

.nspec {
  display: inline;         /* makes the list inline elements */
}
.vspec {
    display: none;
}



#settingsModal {
    margin-top: 10px;
   
    display:none;
    border-bottom-style: solid;
    background-color: #CECBB3;
}

#settingsModal table {
    width:100%;
}

.switch {
  position: relative;
  display: inline-block;
  width: 45px;  /* smaller width */
  height: 25px; /* smaller height */
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 19px; /* smaller knob height */
  width: 19px;  /* smaller knob width */
  left: 3px;    /* smaller offset */
  bottom: 3px;
  background-color: black;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  transform: translateX(20px); /* move knob just enough */
}

.slider.round {
  border-radius: 25px;
}

.slider.round:before {
  border-radius: 50%;
}

.settingsDoc {
    font-size: small;

}
.clickme {
    cursor:pointer;
}

@font-face {
    font-family: 'MerchantCopy';
    src: url('MerchantCopy.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Psychedelic';
    src: url('Psycha_1.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Sabbath';
    src: url('sabbath.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}



pre {
    font-family: MerchantCopy;
    background-color:white;
    padding: 3px;
    font-size: 25px;
    text-wrap: wrap;
}

#clipboardView {
 font-family: MerchantCopy;
 background-color:white;
 margin: 0px;
 padding: 3px;
 font-size: 20px;
}   

.psych {
    filter: blur(0.5px) brightness(80%) grayscale(75%) saturate(10%);
    background-image: url(psych.gif);
    background-size: cover;
    background-repead: repeat;
}

.sabbath {
    background-size: cover;
    background-repead: no-repeat;
    background-position: right;
    background-image: url(sabbath.jpg);
}
body.sabbath main {
    background-color: white !important;
}
body.sabbath h1 {
    font-family: sabbath;
    font-size: bigger;
}

/* Miku Theme */
body.miku {
    background-color: #137a7f;
    background-image: url('Miku.gif');
    background-position: bottom right;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100px auto;
}

body.miku main {
    background-color: #86cecb;
    border-color: #e12885;
    border-width: 3px;
    border-style: solid;
}

body.miku #settingsModal {
    border: 2px solid #39c5bb;
    border-radius: 12px;
    background: linear-gradient(135deg, #86cecb 0%, #5dc1d8 100%);
    box-shadow: 0 6px 20px rgba(19, 122, 127, 0.15);
}

body.miku #tplEditorModal {
    background: linear-gradient(135deg, #86cecb 0%, #5dc1d8 100%);
    border: 2px solid #39c5bb;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(19, 122, 127, 0.15);
    padding: 20px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

body.miku .link-buttons a {
    background-color: #39c5bb;
}

body.miku .link-buttons a:hover {
    background-color: #137a7f;
}

body.miku input:checked + .slider {
    background-color: #39c5bb;
}

body.miku input:focus + .slider {
    box-shadow: 0 0 1px #39c5bb;
}

body.miku #settingsModal::before {
    background: linear-gradient(45deg, #39c5bb, #137a7f);
    border-radius: 0 0 50px 0;
    opacity: 0.4;
}

body.miku #infoSection li::before {
    content: "♪";
    color: #e12885;
}

body.miku #infoSection {
    background: linear-gradient(135deg, #86cecb 0%, #5dc1d8 100%);
    border: 2px solid #39c5bb;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(19, 122, 127, 0.1);
    position: relative;
    overflow: hidden;
}

body.miku #infoSection #clippy {
    width: 150px;
    height: auto;
    float: right;
}

body.miku .gray {
    background-color: #137a7f !important;
    color: #86cecb !important;
}

body.miku #tplEditorModal::before {
    background: linear-gradient(45deg, #39c5bb, #137a7f);
}

 body.miku #tplEditWrapper { 
    background-image: url("HatsuneMiku.jpg"); 
     background-repeat: no-repeat; 
     background-position: bottom center; 
 } 

body.miku #settingsModal button,
body.miku #tplEditorModal button {
    background: linear-gradient(135deg, #39c5bb 0%, #137a7f 100%);
    padding: 3px;
    margin-left: 3px;
    color: white;
}

body.miku #settingsModal button:hover,
body.miku #tplEditorModal button:hover {
    background: linear-gradient(135deg, #137a7f 0%, #0f6266 100%);
}

body.miku h1, body.miku h2, body.miku h3 {
    color: #137a7f;
}

body.miku #tplList li:hover {
    background: rgba(57, 197, 187, 0.2);
}

body.miku #settingsModal h3 {
    color: #137a7f;
    border-bottom: 2px solid #39c5bb;
}

body.miku #tplTitle {
    color: #137a7f;
    border-bottom: 2px solid #39c5bb;
}
/* Enhanced Miku Theme Tab Effects */
body.miku .tab {
  overflow: hidden;
  border: 2px solid #39c5bb;
  background: linear-gradient(135deg, #86cecb 0%, #5dc1d8 100%);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 8px rgba(19, 122, 127, 0.2);
}

body.miku .tab button {
  background: linear-gradient(135deg, #86cecb 0%, #5dc1d8 100%);
  color: #137a7f;
  font-weight: 600;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Animated background effect on hover */
body.miku .tab button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(225, 40, 133, 0.3) 25%, 
    rgba(57, 197, 187, 0.4) 50%, 
    rgba(225, 40, 133, 0.3) 75%, 
    transparent 100%);
  transition: left 0.6s ease-in-out;
  z-index: 1;
}

/* Musical note animation */
body.miku .tab button::after {
  content: "♪";
  position: absolute;
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
  color: #e12885;
  font-size: 16px;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 2;
}

body.miku .tab button:hover {
  background: linear-gradient(135deg, #39c5bb 0%, #137a7f 100%);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(19, 122, 127, 0.3);
}

body.miku .tab button:hover::before {
  left: 100%;
}

body.miku .tab button:hover::after {
  right: 8px;
  opacity: 1;
  animation: musicalBounce 0.6s ease-in-out infinite alternate;
}

/* Holographic shimmer effect for active tab */
body.miku .tab button.active {
  background: linear-gradient(45deg, 
    #39c5bb 0%, 
    #86cecb 25%, 
    #5dc1d8 50%, 
    #39c5bb 75%, 
    #137a7f 100%);
  background-size: 300% 300%;
  animation: mikuShimmer 2s ease-in-out infinite;
  color: white;
  text-shadow: 0 0 10px rgba(225, 40, 133, 0.5);
  border-bottom: 3px solid #e12885;
}

/* Pulse effect for active tab */
body.miku .tab button.active::before {
  background: radial-gradient(circle, 
    rgba(225, 40, 133, 0.2) 0%, 
    transparent 70%);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 200%;
  height: 200%;
  animation: mikuPulse 1.5s ease-in-out infinite;
}

/* Tab content styling */
body.miku .wrapper {
  background: linear-gradient(135deg, #86cecb 0%, #5dc1d8 100%);
  border: 2px solid #39c5bb;
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 15px rgba(19, 122, 127, 0.15);
  position: relative;
  overflow: hidden;
}

body.miku .wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    #e12885 0%, 
    #39c5bb 50%, 
    #e12885 100%);
  animation: mikuLine 3s linear infinite;
}

/* Keyframe animations */
@keyframes musicalBounce {
  0% { transform: translateY(-50%) scale(1); }
  100% { transform: translateY(-50%) scale(1.2) rotate(10deg); }
}

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

@keyframes mikuPulse {
  0% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
}

@keyframes mikuLine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Pikarin Theme */
body.pikarin {
    background-color: #ff80c0;
    background-image: url('satan.png');
    background-position: bottom right;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 120px auto;
}

body.pikarin main {
    background-color: #ffd6f2;
    border-color: #800040;
    border-width: 3px;
    border-style: solid;
}

body.pikarin #settingsModal {
    border: 2px solid red;
    border-radius: 12px;
    background: linear-gradient(135deg, #f3c6ff 0%, #ffd6f2 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

body.pikarin #tplEditorModal {
    background-color: #f3c6ff;
}
body.pikarin .link-buttons a {
    background-color: #ffd6f2;
}

body.pikarin input:checked + .slider {
  background-color: #ff80c0;
}
body.pikarin #settingsModal::before {
    background: linear-gradient(45deg, red, black);
    border-radius: 0 0 50px 0;
    opacity: 0.4;
}

body.pikarin #infoSection li::before {
    content: "🖤";
    color: black;
}


body.pikarin #infoSection {
    background: linear-gradient(135deg, #ff80c0 0%, #ffd6f2 100%);
    border: 2px solid #d4b896;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

body.pikarin input:focus + .slider {
  box-shadow: 0 0 1px #ff80c0;
}


body.pikarin .gray {
    background-color: black !important;
    color: #ffd6f2 !important;
}

body.pikarin #tplEditorModal {
    border: 2px solid red;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff80c0 0%, #ffd6f2 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

body.pikarin #tplEditorModal::before {
    background: linear-gradient(45deg, red, black);
}

body.pikarin #tplEditWrapper {
    background-image: url("pikabadge.png");
    background-repeat: no-repeat;
    background-position: bottom center;
}

body.pikarin #tplEditorModal button {
    background: linear-gradient(135deg, red 0%, black 100%);
    padding:3px;
    margin-left: 3px;    
}

.tab {
  overflow: hidden;
  border: 1px solid #ccc;
  background-color: #f1f1f1;
}
.tab button {
  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
}

/* Change background color of buttons on hover */
.tab button:hover {
  background-color: #ddd;
}

/* Create an active/current tablink class */
.tab button.active {
  background-color: #ccc;
}

/* Style the tab content */
.wrapper {
  display: none;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-top: none;
}

.dark {
    filter: brightness(20%); 
} 
.light {
    filter: brightness(100%); 
} 


#infoSection {
    background: linear-gradient(135deg, #f8f4e6 0%, #f0e6d6 100%);
    border: 2px solid #d4b896;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Accent décoratif en haut à gauche */
#infoSection::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #d4b896, #c4a885);
    border-radius: 0 0 60px 0;
    opacity: 0.3;
}

#infoSection h2 {
    color: #6b4e3d;
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.4em;
    border-bottom: 2px solid #d4b896;
    padding-bottom: 8px;
    position: relative;
    z-index: 1;
}

#infoSection p {
    line-height: 1.6;
    margin-bottom: 12px;
    color: #5a4037;
}

#infoSection strong {
    color: #6b4e3d;
    font-weight: 600;
}

#infoSection ul {
    padding-left: 0;
    list-style: none;
    margin: 12px 0;
}

#infoSection li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #5a4037;
}

/* Puces personnalisées */
#infoSection li::before {
    content: "▸";
    color: #d4b896;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

#clippy {
    width:150px;
    height:150px;
    float: left;
}

/* Animation d'apparition */
#infoSection.show {
    animation: slideDown 0.3s ease-out;
}

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

/* Responsive */
@media (max-width: 600px) {
    #infoSection {
        margin: 10px 0;
        padding: 15px;
        border-radius: 8px;
    }
    
    #infoSection h2 {
        font-size: 1.2em;
    }
}




/* Enhanced Settings Modal Styling */
    #settingsModal {
	margin-top: 10px;
	display: none;
	border: 2px solid #a89d85;
	border-radius: 12px;
	background: linear-gradient(135deg, #CECBB3 0%, #d4d0b8 100%);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
	padding: 20px;
	position: relative;
	overflow: hidden;
    }

/* Decorative accent for settings modal */
#settingsModal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #a89d85, #998c78);
    border-radius: 0 0 50px 0;
    opacity: 0.4;
}

#settingsModal h3 {
    color: #5a4d3a;
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.3em;
    border-bottom: 2px solid #a89d85;
    padding-bottom: 8px;
    position: relative;
    z-index: 1;
}

#settingsModal table {
    width: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(168, 157, 133, 0.3);
}

#settingsModal td {
    padding: 8px;
    color: #5a4d3a;
    vertical-align: middle;
}

#settingsModal .settingsDoc {
    font-size: small;
    color: #6b5d4a;
    font-style: italic;
    margin-top: 5px;
}

/* Enhanced Template Editor Modal */
#tplEditorModal {
    border: 2px solid #a89d85;
    border-radius: 12px;
    background: linear-gradient(135deg, #CECBB3 0%, #d4d0b8 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

#tplEditorModal::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #a89d85, #998c78);
    border-radius: 0 0 0 50px;
    opacity: 0.4;
}

#tplTitle {
    font-weight: bold;
    text-align: center;
    color: #5a4d3a;
    margin-bottom: 16px;
    font-size: 1.3em;
    border-bottom: 2px solid #a89d85;
    padding-bottom: 8px;
    position: relative;
    z-index: 1;
}

#tplEditWrapper {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(168, 157, 133, 0.3);
    margin-bottom: 15px;
}

#tplEditWrapper textarea {
    width: 100%;
    height: 200px;
    box-sizing: border-box;
    border: 1px solid #a89d85;
    border-radius: 6px;
    padding: 10px;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    resize: vertical;
}

#tplEditWrapper textarea:focus {
    outline: none;
    border-color: #8b7d6a;
    box-shadow: 0 0 8px rgba(168, 157, 133, 0.4);
}

#tplList {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(168, 157, 133, 0.3);
}

#tplList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(168, 157, 133, 0.2);
    transition: all 0.2s ease;
    color: #5a4d3a;
}

#tplList li:last-child {
    border-bottom: none;
}

#tplList li:hover {
    font-weight: bold;
    background: rgba(168, 157, 133, 0.2);
    transform: translateX(3px);
}

/* Enhanced button styling for modals */
#settingsModal button,
#tplEditorModal button {
    background: linear-gradient(135deg, #a89d85 0%, #998c78 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#settingsModal button:hover,
#tplEditorModal button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #998c78 0%, #8b7d6a 100%);
}

/* Animation for modal appearance */
#settingsModal.show,
#tplEditorModal.show {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
