@import url('https://fonts.googleapis.com/css2?family=Pirata+One&display=swap');

body,html {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #000000;
	overflow: auto;
}

#background-video {
	position: fixed;
	right: 0;
	bottom: 0;
	min-width: 100%; 
	min-height: 100%;
	z-index: -1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
	object-fit: cover;
}



div#header-wrapper {
    width: calc( 100vw - 20px);
	min-width: 980px;
    height: 160px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

div#head {
    width: calc(100vw - 446px);
	min-width: 555px;
    height: 50px;
    /* padding-top: 0px; */
    background: url(
    ../images/sfondi/index/pirateswar_top.png) repeat-x;
    position: absolute;
    left: 176px;
    top: 0;
    z-index: 1;
}

div#bussola {
    position: absolute;
    right: 0;
    top: -1px;
    width: 260px;
    height: 160px;
    background: url(../images/sfondi/index/bussola.png?v=5f9aa48c) no-repeat;
    z-index: 2;
}

div#ago {
	position: absolute;
    background: url(../images/sfondi/index/agoBussola.png?v=5f9aa48c) no-repeat;
    right: 75px;
    top: 39px;
    height: 70px;
    width: 14px;
    background-size: contain;
}

div#head-logo {
    position: fixed;
    top: 10px;
    left: 50%;
    width: 577px;
    height: 132px;
    background: url(../images/sfondi/index/head-logo.png?v=5f9aa48c) no-repeat;
    z-index: 10;
    transform: translateX(-50%);
	z-index: 100;
}





div#menu-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 176px;
    height: 580px;
    float: left;
    padding: 0;
    margin: 0;
    background: url(../images/sfondi/index/pirates-war-menu.png?v=5f9aa48c) no-repeat;
}

div#menu {
	position: absolute;
    bottom: 165px;
    left: 5px;
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 162px;
    align-items: center;
}

div#menu .btt a{
	width: 135px;
	font-family: 'Pirata One', cursive, serif;
	font-size: 21px;
	color: #fff;
	text-decoration: none;
	text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9);

}

div#menu .btt a:hover{
	text-shadow:1px 1px 10px #fff, 1px 1px 10px #ccc;
}

div#menu .btt a:active{
	text-shadow:1px 1px 10px #fff, 1px 1px 10px #ccc;
	zoom: 0.95;
}

div#menu .btt.active a{
	text-shadow:1px 1px 10px #fff, 1px 1px 10px #ccc;
}


div#content {
	width: calc(100vw - 290px);
    color: #fff;
    z-index: 10;
    position: absolute;
    left: 190px;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

div#content-wrapper {
	float: left;
	width: calc(100% - 40px);
	margin: 10px;
    margin-bottom: 100px;
    padding: 15px;
	border-radius: 18px;
	background: linear-gradient(155deg, rgba(6, 12, 20, 0.72), rgba(9, 18, 30, 0.62));
	border: 1px solid rgba(215, 181, 109, 0.35);
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(2px);
	overflow: hidden;
}


div.error {
	color: #ffae00;
	background-color: #000000ad;
	padding: 10px;
	border-radius: 10px;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1000;
	width: 300px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	
}

div.error img {
	width: 150px;
	height: 150px;
	margin:10px;
}

div#cookie-bar {
    width: calc(100% - 20px);
	height: auto;
}


#audioSwitch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #8f6a2f;
    border-radius: 50%;
    background: rgba(20, 18, 16, 0.95);
    color: #d7b56d;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#audioSwitch:hover {
    transform: scale(1.08);
    color: #ffd27f;
    border-color: #c8963c;
}

@media screen and (max-width: 900px) {
    div#header-wrapper {
        width: 100%;
        min-width: auto;
    }

    div#head {
        display: none;
    }

    div#bussola {
        display: none;
    }

    div#head-logo {
        width: 300px;
        top: 20px;
		z-index: 1;
    }

    div#content {
        width: calc(100% - 20px);
        left: 10px;
    }

	div#head-logo {
        left: calc(50%);
        transform: translateX(-50%);
        width: 80vw;
        background-size: contain;
		height: 170px;
    }

	div#menu-wrapper {
        background: rgba(0, 0, 0, 0.8);
        position: fixed;
        top: 20px;
        left: 10px;
        z-index: 1000;
        border-radius: 10px;
        padding: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        width: calc(100% - 40px);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        visibility: hidden;
        opacity: 0;
    }

    div#menu-wrapper.active {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }

    div#menu {
        position: absolute;
        bottom: 0;
        left: 5px;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        width: 100%;
        align-items: center;
    }

    div#menu-toggle {
        display: block;
        position: fixed;
        top: 30px;
        left: 20px;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.8);
        border-radius: 50%;
        z-index: 1001;
        cursor: pointer;
    }

	div#menu-toggle:hover {
		transform: scale(1.1);
	}

    div#menu-toggle::before,
    div#menu-toggle::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background: #fff;
        left: 50%;
        transform: translateX(-50%);
        transition: all 0.3s ease;
    }

    div#menu-toggle::before {
        top: 12px;
        box-shadow: 0 8px 0 #fff;
    }

    div#menu-toggle::after {
        bottom: 12px;
    }

    div#menu-toggle.active::before {
        top: 50%;
        transform: translate(-50%, -50%) rotate(45deg);
        box-shadow: none;
    }

    div#menu-toggle.active::after {
        bottom: 50%;
        transform: translate(-50%, 50%) rotate(-45deg);
    }
}

#language-selector {
    position: absolute;
    bottom:  0px;
    left: 50%;
    width: calc(100% - 70px);
    z-index: 1001;
    background: rgba(0,0,0,0.8);
    padding: 5px 10px;
    border-radius: 5px;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-around;
}

#language-selector a {
    color: #c9a14a;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

#language-selector a:hover, #language-selector a.active {
    color: #ffd700;
}

/* Header top menu stile barra orizzontale */
div#header-wrapper {
    width: 100%;
    min-width: 0;
    height: 72px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(7, 12, 20, 0.96) 0%, rgba(7, 10, 16, 0.92) 100%);
    border-bottom: 1px solid rgba(181, 131, 49, 0.45);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

div#top-nav {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 18px;
    box-sizing: border-box;
}

div#head,
div#bussola,
div#head-logo,
#menu-toggle,
#language-selector {
    display: none !important;
}

a#top-nav-logo {
    width: 260px;
    height: 62px;
    flex-shrink: 0;
    background: url(../images/sfondi/index/head-logo.png?v=5f9aa48c) center center no-repeat;
    background-size: contain;
}

div#menu-wrapper {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    background: transparent;
    transform: none;
    visibility: visible;
    opacity: 1;
}

div#menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    width: auto;
    height: auto;
}

div#menu .btt {
    text-align: center;
    display: inline-flex;
    width: auto;
    flex: 0 0 auto;
}

div#menu .btt a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 8px 12px;
    font-family: 'IM Fell English SC', 'Times New Roman', serif;
    font-size: 19px;
    color: #f2efe6;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.75);
    transition: all 0.2s ease;
}

div#menu .btt.menu-mobile-only {
    display: none;
}

div#menu .btt:hover a,
div#menu .btt a:hover,
div#menu .btt.active a {
    color: #f3d38a;
    border-bottom-color: #c99a3d;
}

div#top-nav-social {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

div#top-nav-social a {
    display: inline-flex;
    align-items: center;
    color: #d6d9de;
    text-decoration: none;
    line-height: 1;
}

div#top-nav-social a img {
    width: 26px;
    height: 26px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

#language-selector-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 2px;
}

#language-selector-top .lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #8f6a2f;
    border-radius: 50%;
    background: rgba(20, 18, 16, 0.95);
    color: #d7b56d;
    text-decoration: none;
    font-family: 'IM Fell English SC', 'Times New Roman', serif;
    font-size: 12px;
    letter-spacing: 0.4px;
    transition: all 0.2s ease;
}

#language-selector-top .lang-switch:hover,
#language-selector-top .lang-switch.active {
    color: #ffd27f;
    border-color: #c8963c;
    transform: scale(1.08);
}

a#top-nav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid #b68434;
    border-radius: 6px;
    background: linear-gradient(180deg, #2f2417 0%, #1f1812 100%);
    color: #e8cb89;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'IM Fell English SC', 'Times New Roman', serif;
    font-size: 20px;
    letter-spacing: 0.6px;
}

a#top-nav-login.top-nav-logout {
    border-color: #b34242;
    background: linear-gradient(180deg, #4b1b1b 0%, #2f1212 100%);
    color: #f2c4c4;
}

a#top-nav-login.top-nav-logout:hover {
    border-color: #d35a5a;
    color: #ffd6d6;
}

.top-nav-account {
    position: relative;
    margin-left: 8px;
}

.top-nav-account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #8f6a2f;
    border-radius: 999px;
    padding: 4px 6px 4px 12px;
    background: rgba(20, 18, 16, 0.95);
    color: #f2efe6;
    cursor: pointer;
}

.top-nav-account-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

.top-nav-account-nick {
    font-family: 'IM Fell English SC', 'Times New Roman', serif;
    font-size: 16px;
    color: #f2efe6;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-nav-account-diamanti {
    font-size: 12px;
    color: #8fd8ff;
}

.top-nav-account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #c99a3d;
    background: #1b1b1b;
}

.top-nav-account-avatar-wrap {
    position: relative;
    display: inline-flex;
}

.top-nav-account-crown {
    position: absolute;
    top: -8px;
    right: -4px;
    font-size: 15px;
    color: gold;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
    transform: rotate(20deg);
    pointer-events: none;
}

.top-nav-account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    border: 1px solid rgba(182, 132, 52, 0.75);
    border-radius: 10px;
    background: rgba(6, 12, 22, 0.98);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
    padding: 8px;
    display: none;
    z-index: 1100;
}

.top-nav-account.open .top-nav-account-menu {
    display: block;
}

.top-nav-account-menu a {
    display: block;
    color: #f2efe6;
    text-decoration: none;
    font-family: 'IM Fell English SC', 'Times New Roman', serif;
    font-size: 17px;
    padding: 8px 10px;
    border-radius: 6px;
}

.top-nav-account-menu a:hover {
    background: rgba(201, 154, 61, 0.15);
    color: #f3d38a;
}

div#content {
    width: calc(100% - 40px);
    left: 0;
    position: relative;
    padding: 92px 20px 20px;
    box-sizing: border-box;
}

#content-bottom-placeholder {
    display: block;
    height: 10px;
    width: 100%;
    pointer-events: none;
}



@media screen and (max-width: 1405px) {
    a#top-nav-logo {
        width: 220px;
        height: 58px;
    }

    div#menu .btt a {
        font-size: 17px;
        padding: 7px 9px;
    }
}

@media screen and (max-width: 1275px) {
    a#top-nav-logo {
        width: 220px;
        height: 58px;
    }

    div#menu .btt a {
        font-size: 15px;
        padding: 5px 7px;
    }
}

@media screen and (max-width: 1200px) {
    div#top-nav {
        position: relative;
        gap: 10px;
    }

    #menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: flex-start;
        min-width: 92px;
        height: 40px;
        padding: 0 12px 0 36px;
        border: 1px solid #b68434;
        border-radius: 8px;
        background: linear-gradient(180deg, #2f2417 0%, #1f1812 100%);
        cursor: pointer;
        position: relative;
        z-index: 1002;
        font-family: 'IM Fell English SC', 'Times New Roman', serif;
        font-size: 14px;
        letter-spacing: 0.8px;
        color: #e5c584;
    }

    #menu-toggle::before,
    #menu-toggle::after {
        content: '';
        position: absolute;
        left: 11px;
        width: 18px;
        height: 2px;
        background: #e5c584;
        transition: all 0.2s ease;
    }

    #menu-toggle::before {
        transform: translateY(-5px);
        box-shadow: 0 5px 0 #e5c584;
    }

    #menu-toggle::after {
        transform: translateY(5px);
    }

    #menu-toggle.active::before {
        transform: rotate(45deg);
        box-shadow: none;
    }

    #menu-toggle.active::after {
        transform: rotate(-45deg);
    }

    div#menu-wrapper {
        position: absolute;
        top: 58px;
        left: 270px;
        min-width: 280px;
        max-width: min(520px, calc(100vw - 300px));
        padding: 10px;
        border: 1px solid rgba(182, 132, 52, 0.75);
        border-radius: 10px;
        background: rgba(6, 12, 22, 0.96);
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
        transform: translateY(-10px);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: all 0.2s ease;
        z-index: 1001;
    }

    div#menu-wrapper.active {
        transform: translateY(0);
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    div#menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    div#menu .btt,
    div#menu .btt a {
        width: 100%;
        justify-content: flex-start;
    }

    div#menu .btt a {
        padding: 8px 10px;
        font-size: 16px;
    }

    div#menu .btt.menu-mobile-only {
        display: inline-flex;
    }

    div#menu .btt.menu-mobile-only a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    div#menu .btt.menu-mobile-only a img {
        width: 18px;
        height: 18px;
        display: inline-block;
    }

    #language-selector-top {
        gap: 4px;
    }
}

@media screen and (max-width: 1024px) {
    div#top-nav {
        gap: 10px;
        padding: 8px 10px;
    }

    a#top-nav-logo {
        width: 220px;
        height: 58px;
    }

    div#top-nav-social a img {
        width: 24px;
        height: 24px;
    }

    a#top-nav-login {
        min-width: 90px;
        font-size: 16px;
    }
}

@media screen and (max-width: 800px) {
    #menu-toggle {
        min-width: 40px;
        width: 40px;
        padding: 0;
        font-size: 0;
    }
}

@media screen and (max-width: 650px) {
    div#header-wrapper {
        height: auto;
        min-height: 112px;
    }

    div#top-nav {
        flex-wrap: wrap;
        align-items: center;
        row-gap: 6px;
        padding: 6px 8px 8px;
    }

    a#top-nav-logo {
        order: 1;
        width: 100%;
        height: 46px;
        background-position: center center;
    }

    #menu-toggle {
        order: 2;
    }

    div#top-nav-social {
        order: 3;
        margin-left: 0;
    }

    a#top-nav-login {
        order: 4;
        margin-left: auto;
        min-width: 78px;
        height: 34px;
        font-size: 14px;
        padding: 0 10px;
    }

    .top-nav-account {
        order: 4;
        margin-left: auto;
    }

    .top-nav-account-nick {
        max-width: 120px;
        font-size: 14px;
    }

    .top-nav-account-diamanti {
        font-size: 11px;
    }

    div#menu-wrapper {
        top: 102px;
        left: 8px;
        min-width: 0;
        max-width: calc(100vw - 16px);
    }

    div#content {
        width: calc(100% - 20px);
        padding: 128px 10px 0;
    }
}

@media screen and (max-width: 375px) {
    #top-nav-social .top-nav-social-link {
        display: none;
    }
}
