#middle {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.word {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1;
}
#bbHeader {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0;
    margin-top: 0;
    text-align: center;
}

.element {
    display: inline-block;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 1em;
    font-weight: 700;
    color: #228B22;
    background: #e6f7e6;
    border: 2px solid #228B22;
    border-bottom: 2px solid #228B22;
    border-radius: 6px;
    padding: 2px 8px;
    margin-right: 2px;
    box-shadow: 0 2px 6px rgba(34,139,34,0.10);
    vertical-align: middle;
}

#fpContainertop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 60px 0 40px 0;
    height: auto;
    border-bottom: none !important;
    background: #f5f5f5;
}


.element {
    display: inline-block;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 1em;
    font-weight: 700;
    color: #228B22;
    background: #e6f7e6;
    border: 2px solid #228B22;
    border-radius: 6px;
    padding: 2px 8px;
    margin-right: 2px;
    box-shadow: 0 2px 6px rgba(34,139,34,0.10);
    vertical-align: middle;
}

#fpContainertop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 8px 0 8px 0;
    border-bottom: 2px solid #333;
    background: #f5f5f5;
    box-sizing: border-box;
    flex-shrink: 0;
    flex-grow: 0;
}
#bbHeader {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 3rem;
    color: #228B22;
    margin: 0 0 16px 0;
    padding: 0;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

#fpContainertop {
    flex-direction: column;
}
body.darkmode {
    background: #181818 !important;
    color: #f0f0f0 !important;
}

#fpContainerwhole.darkmode {
    background: #181818 !important;
    border-color: #444 !important;
}

#fpContainertop.darkmode {
    background: #232323 !important;
    border-bottom: none !important;
}

.fpContainerbottom.darkmode {
    background: #181818 !important;
}

#left.darkmode, #middle.darkmode, #right.darkmode {
    background: #232323 !important;
    border-color: #444 !important;
    color: #f0f0f0 !important;
}

#themepage.darkmode, #back.darkmode {
    background: #232323 !important;
    border-color: #444 !important;
    color: #f0f0f0 !important;
}

#themeSelector.darkmode {
    background: #232323 !important;
    border-color: #444 !important;
    color: #f0f0f0 !important;
}

.innertheme.darkmode label {
    color: #f0f0f0 !important;
}

.innertheme.darkmode select {
    background: #181818 !important;
    color: #f0f0f0 !important;
    border-color: #444 !important;
}
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
}
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#fpContainerwhole {
    width: 100vw;
    min-width: 100vw;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* Allow vertical expansion */
}

#fpContainertop {
    flex: 0 0 80px;
    width: 100%;
    border-bottom: 2px solid #333;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fpContainerbottom {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100vw;
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin-top: 0;
    gap: 24px;
    min-height: 0;
    height: auto;
    box-sizing: border-box;
    overflow: visible;
}

#left, #middle, #right {
    /* flex removed for #middle, kept for #left and #right below */
#left, #right {
    flex: 1 1 0;
}
    min-width: 0;
    background: #fafafa;
    border: none !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center content vertically */
    font-size: 1.1rem;
    box-shadow: none !important;
    box-sizing: border-box;
    overflow: visible;
}


.container-img {
    transition: transform 0.18s cubic-bezier(0.4,0,0.2,1);
    width: 240px;
    height: 240px;
    object-fit: cover;
    margin: 0;
    border-radius: 50%;
    box-shadow: none !important;
    border: none !important;
    display: block;
    position: absolute;
    z-index: 1;
}

.container-img:hover {
    cursor: pointer;
    transform: scale(0.93);
    z-index: 2;
}

.circle-layout {
    position: relative;
    width: 700px;
    height: 700px;
    margin: 0 auto;
    left: 0;
    right: 0;
}
.circle-layout .container-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.circle-layout .container-img:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateY(-300px) rotate(0deg); }
.circle-layout .container-img:nth-child(2) { transform: translate(-50%, -50%) rotate(45deg) translateY(-300px) rotate(-45deg); }
.circle-layout .container-img:nth-child(3) { transform: translate(-50%, -50%) rotate(90deg) translateY(-300px) rotate(-90deg); }
.circle-layout .container-img:nth-child(4) { transform: translate(-50%, -50%) rotate(135deg) translateY(-300px) rotate(-135deg); }
.circle-layout .container-img:nth-child(5) { transform: translate(-50%, -50%) rotate(180deg) translateY(-300px) rotate(-180deg); }
.circle-layout .container-img:nth-child(6) { transform: translate(-50%, -50%) rotate(225deg) translateY(-300px) rotate(-225deg); }
.circle-layout .container-img:nth-child(7) { transform: translate(-50%, -50%) rotate(270deg) translateY(-300px) rotate(-270deg); }
.circle-layout .container-img:nth-child(8) { transform: translate(-50%, -50%) rotate(315deg) translateY(-300px) rotate(-315deg); }
.circle-layout .circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 2em;
    background: rgba(255,255,255,0.85);
    color: #222;
    padding: 24px 32px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    z-index: 10;
    transition: background 0.3s, color 0.3s;
    text-align: center;
    max-width: 90%;
    width: auto;
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: break-word;
    display: block;
}
.darkmode .circle-layout .circle-text,
#fpContainerwhole.darkmode .circle-layout .circle-text {
    background: rgba(34,34,34,0.92) !important;
    color: #f0f0f0 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
    border: 1.5px solid #444;
}


#themeSelector {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    max-width: 400px;
    width: 90vw;
    box-sizing: border-box;
    overflow: auto;
}
/* Center the top section and Change Themes button */
#fpContainertop {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    border-bottom: 2px solid #333;
    background: #f5f5f5;
}

#themepage {
    padding: 12px 32px;
    font-size: 1.2rem;
    border-radius: 8px;
    border: 2px solid #333;
    background: #e0e0e0;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
#themepage:hover {
    background: #d1d1d1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Layout for bottom section */
.fpContainerbottom {
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin-top: 32px;
    gap: 24px;
}


#left, #middle, #right {
    min-width: 120px;
    min-height: 700px; /* Increased from 200px to 700px for more height */
    border: none !important;
    background: #fafafa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
#left, #right {
    flex: 1 1 0;
    min-width: 0;
}
#middle {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

#left {
    margin-left: 0;
}
#right {
    margin-right: 0;
}

#fpContainerwhole {
    max-width: 900px;
    margin: 40px auto;
    padding: 24px;
    border: none !important;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

#back {
    display: none;
    margin: 0 0 16px 0;
    padding: 10px 24px;
    font-size: 1rem;
    border-radius: 6px;
    border: 2px solid #333;
    background: #e0e0e0;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    align-self: flex-start;
}
#back:hover {
    background: #d1d1d1;
}

#themeSelector {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    border: none !important;
    border-radius: 10px;
    background: #f9f9f9;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.innertheme {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 8px;
    width: 100%;
}

.innertheme label {
    font-weight: bold;
    margin-bottom: 4px;
}

.innertheme select {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #aaa;
    font-size: 1rem;
    background: #fff;
}
#themeSelector{
    display:none;
    flex-direction:column;

}

#back {
    display:none;
}

.General {
    width:100px;
}

.general {
    width:200px;
}

#background {
    width:200px;
}

#font {
    width:200px;
}

#fontsize {
    width:200px;
}

#color {
    width:200px;
}

/* --- Responsive Circle and Header Fixes --- */
:root {
    --circle-size: clamp(340px, 70vw, 650px);
    --img-size: clamp(70px, 16vw, 160px);
    --circle-radius: calc(var(--circle-size) / 2 - var(--img-size) / 2);
}

.circle-layout {
    position: relative;
    width: var(--circle-size);
    height: var(--circle-size);
    margin: 0 auto;
    left: 0;
    right: 0;
    transition: width 0.3s, height 0.3s;
    display: block;
    max-width: 100vw;
    max-height: 100vw;
}
.circle-layout .container-img {
    width: var(--img-size);
    height: var(--img-size);
    object-fit: cover;
    margin: 0;
    border-radius: 50%;
    box-shadow: none !important;
    border: none !important;
    display: block;
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    /* Use a CSS variable for scale on hover */
    --img-scale: 1;
    transition: width 0.3s, height 0.3s, transform 0.2s;
}
.circle-layout .container-img:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateY(calc(-1 * var(--circle-radius))) scale(var(--img-scale)); }
.circle-layout .container-img:nth-child(2) { transform: translate(-50%, -50%) rotate(45deg) translateY(calc(-1 * var(--circle-radius))) rotate(-45deg) scale(var(--img-scale)); }
.circle-layout .container-img:nth-child(3) { transform: translate(-50%, -50%) rotate(90deg) translateY(calc(-1 * var(--circle-radius))) rotate(-90deg) scale(var(--img-scale)); }
.circle-layout .container-img:nth-child(4) { transform: translate(-50%, -50%) rotate(135deg) translateY(calc(-1 * var(--circle-radius))) rotate(-135deg) scale(var(--img-scale)); }
.circle-layout .container-img:nth-child(5) { transform: translate(-50%, -50%) rotate(180deg) translateY(calc(-1 * var(--circle-radius))) rotate(-180deg) scale(var(--img-scale)); }
.circle-layout .container-img:nth-child(6) { transform: translate(-50%, -50%) rotate(225deg) translateY(calc(-1 * var(--circle-radius))) rotate(-225deg) scale(var(--img-scale)); }
.circle-layout .container-img:nth-child(7) { transform: translate(-50%, -50%) rotate(270deg) translateY(calc(-1 * var(--circle-radius))) rotate(-270deg) scale(var(--img-scale)); }
.circle-layout .container-img:nth-child(8) { transform: translate(-50%, -50%) rotate(315deg) translateY(calc(-1 * var(--circle-radius))) rotate(-315deg) scale(var(--img-scale)); }
.circle-layout .container-img:hover {
    --img-scale: 0.92;
    cursor: pointer;
    z-index: 2;
}

#bbHeader {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: #228B22;
    margin: 0 0 16px 0;
    padding: 0;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

@media (max-width: 700px) {
    .circle-layout {
        width: 96vw;
        height: 96vw;
        min-width: 0;
        min-height: 0;
        max-width: 100vw;
        max-height: 100vw;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 2vw;
        position: relative;
    }
    .circle-layout .container-img {
        position: static;
        left: unset;
        top: unset;
        width: 28vw;
        height: 28vw;
        max-width: 120px;
        max-height: 120px;
        min-width: 40px;
        min-height: 40px;
        margin: 0 auto;
        border-radius: 50%;
        transform: none !important;
        z-index: 1;
    }
    /* Place images in a 3x3 grid, empty center */
    .circle-layout .container-img:nth-child(1) { grid-area: 1 / 2 / 2 / 3; }
    .circle-layout .container-img:nth-child(2) { grid-area: 1 / 3 / 2 / 4; }
    .circle-layout .container-img:nth-child(3) { grid-area: 2 / 3 / 3 / 4; }
    .circle-layout .container-img:nth-child(4) { grid-area: 3 / 3 / 4 / 4; }
    .circle-layout .container-img:nth-child(5) { grid-area: 3 / 2 / 4 / 3; }
    .circle-layout .container-img:nth-child(6) { grid-area: 3 / 1 / 4 / 2; }
    .circle-layout .container-img:nth-child(7) { grid-area: 2 / 1 / 3 / 2; }
    .circle-layout .container-img:nth-child(8) { grid-area: 1 / 1 / 2 / 2; }
    .circle-layout .circle-text {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        font-size: 5vw;
        padding: 3vw 2vw;
        margin: 0 auto;
        text-align: center;
        width: max-content;
        white-space: nowrap;
        background: rgba(255,255,255,0.85);
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    }
}

