/* -- PALETA DE CORES --
  Fundo da Janela: #E2D7C7 (Bege Papel)
  Barras de Título/Tarefa: #6a7a63 (Verde Musgo)
  Texto Principal: #3a342e (Marrom Escuro)
  Destaque (Hover): #a98e72 (Laranja Amarronzado)
  Borda Escura: #3a342e (Marrom Escuro)
  Borda Clara: #E2D7C7 (Bege Papel)
*/

body.custom-theme {
    background-image: url('/assets/Autumn.jpg');
    background-size: cover;
    -webkit-font-smoothing: none;
    font-smoothing: none;
}

.custom-theme .window {
    border: 1px solid #3a342e;
    box-shadow: none !important;
    border-radius: 0;
     padding: 0 0 3px 0 !important;
}

.custom-theme .window>.title-bar {
    background: #6a7a63;
    border-radius: 0;
    border-bottom: 1px solid #3a342e;
    padding: 4px;
    height: auto;
    border-top: 1px solid #E2D7C7;
    border-left: 1px solid #E2D7C7;
    border-right: 1px solid #3a342e;
    text-shadow: 1px 1px #3a342e;

}

.custom-theme .window>.title-bar-text {
    color: #E2D7C7;
    text-shadow: none;
    font-size: 16px;
    padding-left: 4px;
}

.custom-theme .window-body {
    background: #E2D7C7;
    color: #3a342e;
}

.custom-theme .title-bar-controls button {
    background-image: none !important;
    background-color: #E2D7C7 !important;
    border-top: 1px solid #F5F1E9;
    border-left: 1px solid #F5F1E9;
    border-right: 1px solid #3a342e;
    border-bottom: 1px solid #3a342e;
    box-shadow: none !important;
    border-radius: 0 !important;
    background-repeat: no-repeat;
    background-position: center;
}

.custom-theme .title-bar-controls button:active {
    border-top: 1px solid #3a342e;
    border-left: 1px solid #3a342e;
    border-right: 1px solid #F5F1E9;
    border-bottom: 1px solid #F5F1E9;
}

.custom-theme .title-bar-controls button[aria-label="Minimize"] {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='6' width='8' height='3' fill='%233a342e'/%3E%3C/svg%3E") !important;
}

.custom-theme .title-bar-controls button[aria-label="Maximize"] {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='8' height='8' fill='none' stroke='%233a342e' stroke-width='2'/%3E%3C/svg%3E") !important;
}

.custom-theme .title-bar-controls button[aria-label="Restore"] {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='3' width='6' height='6' fill='none' stroke='%233a342e' stroke-width='1.5'/%3E%3Crect x='3' y='1' width='6' height='6' fill='%23E2D7C7' stroke='%233a342e' stroke-width='1.5'/%3E%3C/svg%3E") !important;
}

.custom-theme .title-bar-controls button[aria-label="Close"] {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1 L9 9 M9 1 L1 9' stroke='%233a342e' stroke-width='2'/%3E%3C/svg%3E") !important;
}

.custom-theme .taskbar {
    background: linear-gradient(hsl(105, 11%, 28%) 0px, hsl(105, 11%, 40%) 3%, hsl(105, 11%, 55%) 6%, hsl(105, 11%, 60%) 10%, hsl(105, 11%, 55%) 12%, hsl(105, 11%, 50%) 15%, hsl(105, 11%, 48%) 18%, hsl(105, 11%, 46%) 20%, hsl(105, 11%, 45%) 23%, hsl(105, 11%, 43%) 38%, hsl(105, 11%, 46%) 54%, hsl(105, 11%, 50%) 86%, hsl(105, 11%, 48%) 89%, hsl(105, 11%, 44%) 92%, hsl(105, 11%, 38%) 95%, hsl(105, 11%, 32%) 98%);
}

.custom-theme .start-menu-header,
.custom-theme .start-menu-footer {
    background: #6a7a63;
    text-shadow: none;
}

.custom-theme .start-menu-header::before {
    box-shadow: #3a342e 0px -1px 1px inset;
}

.custom-theme .start-menu-right hr {
    background: linear-gradient(90deg, transparent 0, #6a7a6385 50%, transparent) !important;
}

.custom-theme hr.orange {
    background: linear-gradient(90deg, #73846e 10%, orange 50%, #73846e) !important;
}

.custom-theme .start-menu-right {
    background: #CDC5B8;
}

.custom-theme .menu-item:hover,
.custom-theme .sidebar .tree-view a:hover,
.custom-theme .sidebar .tree-view a.active {
    background: #a98e72;
    color: #E2D7C7;
}

.custom-theme .menu-item:hover span {
    color: #E2D7C7;
}

.custom-theme .taskbar-item {
    background: #E2D7C7;
    color: #3a342e;
    box-shadow: inset -1px -1px #3a342e, inset 1px 1px #FFFFFF;
    border: none;
    border-radius: 0;
}

.custom-theme .taskbar-item.active {
    background: #D4C8B4 !important;
    box-shadow: inset 1px 1px #3a342e, inset -1px -1px #FFFFFF !important;
}

.custom-theme .taskbar-item:hover {
    filter: brightness(1.05);
}

.custom-theme .taskbar-tray {
    background: linear-gradient(hsl(105, 11%, 38%) 1%, hsl(105, 11%, 65%) 6%, hsl(105, 11%, 75%) 10%, hsl(105, 11%, 68%) 14%, hsl(105, 11%, 65%) 19%, hsl(105, 11%, 64%) 63%, hsl(105, 11%, 70%) 81%, hsl(105, 11%, 69%) 88%, hsl(105, 11%, 68%) 91%, hsl(105, 11%, 62%) 94%, hsl(105, 11%, 55%) 97%, hsl(105, 11%, 42%) 100%);
    border-left: 1px solid #3a342e;
    box-shadow: hsl(105, 11%, 75%) 1px 0px 1px inset;
}

.custom-theme .lang-indicator:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.custom-theme #welcome-window {
    background: #73846e;
}

.custom-theme #welcome-window .help-header {
    background: #4b5448;
    border-image: none;
    border-bottom: 1px solid #3a342e;
}

.custom-theme #welcome-window .help-contents {
    background-color: #92a18e;
}

.custom-theme #welcome-window .help-toolbar,
.custom-theme #welcome-window .window-body {
    background-color: #E2D7C7;
}

.custom-theme .window .title-bar-text::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: text-bottom;
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
}

.custom-theme #diary-window .title-bar-text::before {
    background-image: url('/assets/650.ico');
}

.custom-theme #about-window .title-bar-text::before {
    background-image: url('/assets/User 1.ico');
}

.custom-theme #welcome-window .title-bar-text::before {
    background-image: url('/assets/202.ico');
}

.custom-theme #guestbook-window .title-bar-text::before {
    background-image: url('/assets/network.png');
}

.custom-theme .window {
    overflow: visible;
}

.overflow-sticker {
    position: absolute;
    width: 150px;
    height: auto;
    bottom: -50px;
    right: -30px;
    pointer-events: none;
    z-index: 1;
}

/* --- ESTILOS DO DIÁRIO CUSTOMIZADO --- */

.custom-theme .window.maximized {
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    border-width: 0 !important;
}

.custom-theme #diary-window.maximized .diary-custom-body {
    height: calc(100% - 29px);
}

.custom-theme #diary-window.maximized .corkboard-mural {
    border: none; 
}

.custom-theme #diary-window {
    background: transparent;
    border: 0;
}

.custom-theme .diary-custom-body {
    padding: 0;
    margin: 0;
    background-color: #444B41;
    overflow: hidden;
    display: flex;
}

.custom-theme .corkboard-mural {
    flex-grow: 1;
    background-image: url('/assets/corkboard.png');
    background-size: 800px;
    border: 3px solid #5C4B3A;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow-y: auto;
    padding: 150px 25px 25px 25px;
}

.custom-theme .diary-nav-container {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.custom-theme .diary-year-nav {
    display: flex;
    gap: 20px;
}

.custom-theme .year-tab-wrapper {
    position: relative;
}

.custom-theme .year-tab {
    font-family: 'Indie Flower', cursive;
    font-size: 20px;
    font-weight: bold;
    color: #3a342e;
    background-color: #fdfaf1;
    padding: 8px 30px;
    border: none;
    cursor: pointer;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><filter id="f" x="-20%" y="-20%" width="140%" height="140%"><feTurbulence baseFrequency="0.03" numOctaves="5" seed="1" type="fractalNoise" result="T"/><feDisplacementMap in="SourceGraphic" in2="T" scale="8" xChannelSelector="R" yChannelSelector="G"/></filter></defs><rect width="100%" height="100%" filter="url(%23f)"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><filter id="f" x="-20%" y="-20%" width="140%" height="140%"><feTurbulence baseFrequency="0.03" numOctaves="5" seed="1" type="fractalNoise" result="T"/><feDisplacementMap in="SourceGraphic" in2="T" scale="8" xChannelSelector="R" yChannelSelector="G"/></filter></defs><rect width="100%" height="100%" filter="url(%23f)"/></svg>');
}

.custom-theme .year-tab.active {
    filter: brightness(0.95);
    transform: scale(1.05);
}

.custom-theme .year-tab-wrapper .pin {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11;
}

.custom-theme .diary-month-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 0 20px;
}

.custom-theme .month-link {
    font-family: 'Indie Flower', monospace;
    font-size: 16px;
    color: #3a342e;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 10px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transform: rotate(calc(var(--random-rot) * 1deg));
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><filter id="f" x="-20%" y="-20%" width="140%" height="140%"><feTurbulence baseFrequency="0.03" numOctaves="5" seed="1" type="fractalNoise" result="T"/><feDisplacementMap in="SourceGraphic" in2="T" scale="8" xChannelSelector="R" yChannelSelector="G"/></filter></defs><rect width="100%" height="100%" filter="url(%23f)"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><filter id="f" x="-20%" y="-20%" width="140%" height="140%"><feTurbulence baseFrequency="0.03" numOctaves="5" seed="1" type="fractalNoise" result="T"/><feDisplacementMap in="SourceGraphic" in2="T" scale="8" xChannelSelector="R" yChannelSelector="G"/></filter></defs><rect width="100%" height="100%" filter="url(%23f)"/></svg>');
}

.custom-theme .month-link.active,
.custom-theme .month-link:hover {
    color: #6a7a63;
    background-color: #a98e72;
    transform: scale(1.1);
}

.custom-theme .month-link:nth-child(4n+1) {
    background-color: #fdfaf1;
}

.custom-theme .month-link:nth-child(4n+2) {
    background-color: #cde2d0;
}

.custom-theme .month-link:nth-child(4n+3) {
    background-color: #f5d9d1;
}

.custom-theme .month-link:nth-child(4n+4) {
    background-color: #d1e2f5;
}

.custom-theme .entries-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 10px;
}

.custom-theme .entries-area.grid-two-columns {
    grid-template-columns: 1fr 1fr;
}

.resizer {
    position: absolute;
    width: 10px;
    height: 10px;
    z-index: 5;
}
.resizer.top-left { top: -5px; left: -5px; cursor: nwse-resize; }
.resizer.top-right { top: -5px; right: -5px; cursor: nesw-resize; }
.resizer.bottom-left { bottom: -5px; left: -5px; cursor: nesw-resize; }
.resizer.bottom-right { bottom: -5px; right: -5px; cursor: nwse-resize; }
.resizer.top { top: -5px; left: 5px; width: calc(100% - 10px); cursor: ns-resize; }
.resizer.bottom { bottom: -5px; left: 5px; width: calc(100% - 10px); cursor: ns-resize; }
.resizer.left { top: 5px; left: -5px; height: calc(100% - 10px); cursor: ew-resize; }
.resizer.right { top: 5px; right: -5px; height: calc(100% - 10px); cursor: ew-resize; }

::-webkit-scrollbar-corner {
    background: #d3d8d2 !important;
}

::-webkit-scrollbar-thumb {
    background-position: 50%;
    background-repeat: no-repeat;
    background-color: #c6ccc4 !important;
    background-size: 7px;
    border: 1px solid #fff;
    border-radius: 2px;
    box-shadow: inset -3px 0 #bac0b8, inset 1px 1px #b4b9b2 !important;
}

::-webkit-scrollbar-thumb {
    background-color: #d3d8d2 !important;
    box-shadow: inset -1px -1px #242923, inset 1px 1px #fff, inset -2px -2px #6a7a63, inset 2px 2px #d3d8d2 !important;
}