:root {
    --font-family: serif;
    
    /* Colors */
    --spencer-gold: #C6A667;
    --spencer-black: #1C1C1C;
    --spencer-white: #E3E3E3;
    --shadow-color: rgba(0,0,0,.5);
    
    /* Layout */
    --sidebar-width: 320px;
    
    --page-width: 540px;
    --page-gap: 40px;
    --outer-line-thickness: 5px;
    --inner-line-thickness: 2px;
    --subtitle-size: 12px;
    
    --transition: 0.5s ease all;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-font-smoothing: antialiased; 
}

body { 
    display: flex;
    height: 100vh;
    background: var(--spencer-white); 
    font-family: var(--font-family);
    overflow: hidden; 
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--spencer-black);
    border-right: 1px solid var(--spencer-gold);
    display: flex;
    flex-direction: column; 
    z-index: 100; 
}
.sidebar img { width: 75%; margin-left: 50%; transform: translateX(-50%);}
.sidebar button.save-btn { width: 85%; height: 55px; background: var(--spencer-gold); border: 1px solid var(--spencer-gold); margin-left:50%; transform:translateX(-50%); margin-bottom: 15px; font-size: 14px; cursor: pointer; var(--transition); color: var(--spencer-black); font-weight: 600; } 
.sidebar button.save-btn:hover { background: transparent; color: var(--spencer-gold); }

.sidebar-header { padding: 32px 24px; border-bottom: 1px solid var(--spencer-white); }
.sidebar-header h1 { font-size: 19px; font-weight: 600; color: var(--spencer-gold); }
.sidebar-header p { font-size: 12px; color: #86868b; margin-top: 4px; }

.control-list { padding: 12px; overflow-y: auto; flex: 1; }
.control-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; transition: var(--transition); position: relative; }
.control-item:hover { background: rgba(255,255,255,0.05); }

.mod-info { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #efeff4; }

/* INFO BUTTON & TOOLTIP */
.info-wrapper { position: relative; line-height: 0; }
.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 10px;
    font-family: serif;
    font-style: italic;
    color: rgba(255,255,255,0.4);
    cursor: help;
    transition: var(--transition);
}
.info-btn:hover { border-color: var(--spencer-gold); color: var(--spencer-gold); }

.tooltip {
    visibility: hidden;
    width: 200px;
    background: #2c2c2e;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    position: absolute;
    left: -100px;
    bottom: 150%; /* Default to popping UP */
    opacity: 0;
    transition: var(--transition);
    font-size: 11px;
    line-height: 1.4;
    border: 1px solid var(--border);
    box-shadow: 0 10px 20px var(--shadow-color);
    z-index: 1000;
    pointer-events: none;
}

/* First Item Overide - Pops DOWN */
.tooltip.first-item { bottom: auto; top: 150%; }

.info-wrapper:hover .tooltip { visibility: visible; opacity: 1; }

/* TOGGLE SWITCH */
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background-color: #323234; transition: var(--transition); border-radius: 34px; cursor: pointer; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: #fff; transition: var(--transition); border-radius: 50%; }
input:checked + .slider { background-color: var(--spencer-gold); }
input:checked + .slider:before { transform: translateX(18px); background-color: #161617; }

/* --- CANVAS --- */
.canvas { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; }
.canvas .return { width: 250px; height: 55px; background: rgba(30, 30, 30, 0.8); position: absolute; top: 25px; right: 25px; color: var(--spencer-white); font-size: 14px; border: 1px solid rgba(30, 30, 30, 0.2); border-radius: 50px; backdrop-filter: blur(20px); z-index: 200; cursor: pointer;}
.canvas .return:hover { background: var(--spencer-white); color: #000; }

.page-strip { display: flex; padding: 0 20%; gap: var(--page-gap); transition: transform 0.8s cubic-bezier(0.2, 1, 0.2, 1); will-change: transform; }

.page {
    position: relative;
    width: var(--page-width); 
    height: 700px; 
    background: var(--spencer-black);
    color: #fff;
    box-shadow: 0 40px 100px var(--shadow-color);
    flex-shrink: 0; 
    display: flex; 
    flex-direction: column;
    transition: transform 0.5s, opacity 0.5s;
    opacity: 0.4;
    transform: scale(0.9);
}
.page.active { opacity: 1; transform: scale(1); }

/* DECORATIVE LINES */
.page .outer-line { width: calc(100% - 50px); height: calc(100% - 50px); border: var(--outer-line-thickness) solid var(--spencer-gold); position: absolute; left: 50% ;top: 50%; transform: translate(-50%, -50%); pointer-events: none;}
.page .inner-line { width: calc(100% - 85px); height: calc(100% - 85px); border: var(--inner-line-thickness) solid var(--spencer-gold); position: absolute; left: 50% ;top: 50%; transform: translate(-50%, -50%); pointer-events: none;}
.page .corner-box { width: 50px; height: 50px; background: var(--spencer-black); border: var(--outer-line-thickness) solid var(--spencer-gold); z-index: 10; position: absolute; }
.page #top-left-box { left: 25px; top: 25px; }
.page #top-right-box { right: 25px; top: 25px; }
.page #bottom-left-box { left: 25px; bottom: 25px; }
.page #bottom-right-box { right: 25px; bottom: 25px; }

.page .image-outer {
    margin-top: 15px;
    margin-left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 250px;
    border: 1px solid var(--spencer-gold);
}

.page .image-inner {
    position: absolute;
    top: 175px;
    border: 3px solid var(--spencer-gold);
    margin-left: 50%;
    transform: translateX(-50%);
    width: 370px;
    height: 220px;
}



.cover-content h1 { font-family: "Times New Roman", serif; font-size: 36px; font-weight: 400; color: var(--spencer-gold); text-align: center; letter-spacing: 2px; margin-top: 5px; }
.cover-content p { color: var(--spencer-gold); letter-spacing: 2px; font-size: var(--subtitle-size); font-weight: 700; text-transform: uppercase; text-align: center; margin-top: 85px;}

.presented-by {
  position: absolute;
  top: 425px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--spencer-gold);
  text-align: center;
  font-size: 14pt;
  letter-spacing: 2px;
}

.v-line {
  position: absolute;
  width: 1pt;
  height: 50px;
  background: var(--spencer-gold);
  transform: rotate(90deg);
}

.presented-left {
  top: 410px;
  left: 175px;
}

.presented-right {
  top: 410px;
  right: 175px;
}

.logo {
  position: absolute;
  top: 445px;
  left: 50%;
  transform: translateX(-50%);
  width: 25%;
  aspect-ratio: 1/1;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.prepared-for {
  position: absolute;
  top: 575px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--spencer-gold);
  text-align: center;
  font-size: 14pt;
  letter-spacing: 2px;
}

.prepared-left {
  top: 560px;
  left: 125px;
}

.prepared-right {
  top: 560px;
  right: 125px;
}

.recipient {
  position: absolute;
  top: 600px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18pt;
  color: var(--spencer-gold);
  letter-spacing: 2px;
  text-align: center;
}


.page-header { padding: 60px 60px 20px; border-bottom: 1px solid rgba(78, 65, 40, 0.3); display: flex; justify-content: space-between; align-items: baseline; }
.page-header h2 { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: #86868b; }
.module-grid { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 20px 60px 60px; }

.size-1 { flex: 0 0 calc(33.33% - 11px); }
.size-2 { flex: 0 0 calc(66.66% - 8px); }
.size-3 { flex: 1; }

.module-card {
    background: #262626; border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; padding: 24px; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
}
.mod-name { color: #fff; font-size: 14px; font-weight: 500; }

.toolbar { 
    position: absolute; bottom: 10px; left: calc(50% - 75px); transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.8); backdrop-filter: blur(20px); 
    padding: 8px 16px; border-radius: 50px; display: flex; align-items: center; gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1); z-index: 200;
}
.nav-btn { background: transparent; border: none; color: white; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.nav-btn:hover { background: rgba(255,255,255,0.1); }
.nav-btn:disabled { opacity: 0.1; }
.page-info { font-size: 14px; font-weight: 500; min-width: 90px; text-align: center; color: #fff; }

