:root {
    --container-padding: 20px;
    --card-width: 90px;
    --card-width-large: 110px;
    --dark-base-color: #080808;
    --medium-accent-color-1: #FCB040;
    --medium-accent-color-2: #E50586;
}

body {
    font-family: futura-pt, Arial, sans-serif;
    font-size: 16px;

    background-color: white;
}

a, a:visited {
    color: rgb(42, 42, 42);
    text-decoration: underline;

    cursor: pointer;
}

button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 4px 6px;
    
    height: 30px;
    
    width: 240px;
    max-width: 100%;

    background-color: var(--dark-base-color);
    color: white;

    cursor: pointer;
}
button:hover, button:active {
    background-color: #303030 !important;
}

img {
    border: none;
    outline: none;
}

.invisible {
    display: none !important;
}

.w-100 {
    width: 100% !important;
}

.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.white-background {
    background-color: white !important;
}

.medium-background {
    width: 200%;
    height: 200%;
    position: fixed;
    z-index: -1;

    background-image: url("../img/medium-background.png");
    background-size: 150px;
    background-repeat: repeat;

    transform: rotate(18deg);
    left: -50%;
    top: -50%;

    opacity: 0.07;
}

.container {
    width: calc(100% - var(--container-padding) * 2);
    max-width: 550px;
    margin: 0 auto;
    padding: var(--container-padding);

}

.medium-logo-large {
    width: 100%;
    margin: 25px 0;
}

.playername-notice {
    margin-top: 5px;
    
    font-size: 12px;
    color: #606060;
}

div.perdix-logo {
    position: fixed;
    bottom: 4px;
    right: 4px;
}

div.perdix-logo img {
    width: 100px;
    height: 100px;
}
@media screen and (max-width: 380px) {
    div.perdix-logo img {
        width: 65px;
        height: 65px;
    }
}

#input-player-name {
    padding: 6px 12px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    appearance: none;
    border-radius: 4px;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
#input-player-name:focus{
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
}

.card {
    width: var(--card-width);
    aspect-ratio: 750 / 1046;
    border-radius: 6%;
}

.card-large {
    width: var(--card-width-large) !important;
}

.card-flipped {
    transform: rotate(180deg);
}

.selectable {
    cursor: pointer;
}

.medium-logo-menu-container {
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

}

.medium-logo-small {
    width: calc(100% - 50px);
}

.icon-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;

    color: var(--dark-base-color);
    background-color: #d9d9d9;
    border: none;

    font-size: 16px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-button {
    cursor: pointer;
}

.icon-button:hover, .icon-button:active {
    background-color: #cbcbcb !important;
}

.icon-button.white-background:hover, .icon-button.white-background:active {
    background-color: #f8f8f8 !important;
}

.icon-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.card-selection-container {
    position: fixed;
    bottom: var(--container-padding);
    left: var(--container-padding);
    width: calc(100% - var(--container-padding) * 2);

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.arrow {
    background-image: url("../img/arrow.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

    min-width: 16px;
    height: 100px;
}

.arrow-right {
    transform: rotate(180deg);
}

.hand-cards-scroll-container {
    display: flex;
    overflow: auto;
    flex-flow: row nowrap;
    gap: 10px;

    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.hand-cards-scroll-container::-webkit-scrollbar { /* Hide scrollbar for Chrome, Safari and Opera */
    display: none;
}

.round-opponent-indicator {
    margin-top: 30px;
    margin-bottom: 30px;
    
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.middle-section {
    width: 100%;
    /* display height
    - rough estimation of Medium logo height (display width or max container width multiplied by aspect ratio of image)
    - hand cards row height
    - player and round indicator height
    - custom value because it just looks better like that (nearer to the top than to the bottom) */
    height: calc(100vh - min(100vw, 550px) * 0.4 - 150px - 95px - 50px);
    min-height: 250px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
@media screen and (max-height: 800px) {
    .middle-section {
        margin-bottom: calc(150 * (800px - 100vh) / 100);
    }
}
@media screen and (max-height: 700px) {
    .middle-section {
        margin-bottom: 150px;
    }
}
@media screen and (min-width: 450px) and (min-height: 700px) {
    .played-cards {
        transform: scale(1.2);
    }
}
@media screen and (min-width: 450px) and (min-height: 800px) {
    .base-words-container {
        transform: scale(1.2);
    }
}

.played-cards {
    height: 195px;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: end;
    gap: 30px;
}

.base-words-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.base-word {
    color: white;
    font-size: 18px;
    font-weight: bold;
    
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    float: left;

    width: 150px;
    height: 150px;
    padding: 10px;
    border-radius: 50%;

    overflow-wrap: break-word;
    word-wrap: break-word;

    -ms-word-break: break-all;
    /* This is the dangerous one in WebKit, as it breaks things wherever */
    word-break: break-all;
    /* Instead use this non-standard one: */
    word-break: break-word;

    /* Adds a hyphen where the word breaks, if supported (No Blink) */
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
}
.base-word:nth-child(1) {
    margin-top: 80px;
    margin-right: -20px;
    background-color: var(--medium-accent-color-1);
}
.base-word:nth-child(2) {
    margin-left: -20px;
    background-color: var(--medium-accent-color-2);

}

.action-text-first-phase {
    width: var(--card-width-large);

    font-size: 24px;
    font-weight: bold;
}

.card-opponent-position {
    align-self: start;
}

.medium-suggestion-input-section {
    width: 100%;

    position: fixed;
    bottom: 0;
    left: 0;

    padding: var(--container-padding);
    box-sizing: border-box;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    background-color: #eeeeee;
}

.medium-suggestion-input-section .icon-button:hover, .medium-suggestion-input-section .icon-button:active {
    background-color: #fafafa !important;
}
.medium-suggestion-input-section .icon-button:disabled {
    color: #aaaaaa !important;
    background-color: #fafafa !important;
}

#medium-suggestion-input {
    border-radius: 25px;
    border: none;
    padding: 9px;
    width: calc(100% - 35px - var(--container-padding) * 2 - 10px);
    max-width: 400px;
    height: 35px;

    box-sizing: border-box;
}
#medium-suggestion-input:disabled {
    background: #fafafa;
    color: #404040 !important;
}

.forbidden-words-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    position: fixed;
    bottom: calc(var(--container-padding) * 2 + 35px + 15px);
    left: 0;

    width: 100%;
}

.forbidden-words {
    width: calc(100% - var(--container-padding) * 4);
    max-width: calc(400px + 35px + 10px);
}

.modal {
    width: 100%;
    height: 100%;

    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
}

@keyframes fade-in {
	0% { opacity: 0; }
	100% { opacity: 1; }
}

.modal-visible {
	animation: fade-in 0.3s;

	display: flex !important;
	opacity: 1;
}

.modal-title {
	font-size: 18px;
	font-weight: bold;
}

.modal-game-over {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    background-color: rgba(0, 0, 0, 0.5);
}

.modal-boxed-content {
	position: absolute;

	width: 350px;
	max-width: calc(100% - 40px - 40px);
	max-height: calc(80% - 40px - 40px);
	overflow-y: auto;

	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);

	background-color: white;
	padding: 20px;
	border-radius: 10px;

	font-size: 14px;
}

.modal-title {
	font-size: 18px;
	font-weight: bold;
}

.modal table {
	width: 100%;
	text-align: left;
}

.modal table tr:nth-child(2n) {
    background-color: #f8f8f8;
}

.leaderboard-table-row-of-player {
    background-color: #e50586 !important;
    color: white !important;
}

.modal-standard {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;

    background-color: rgba(0, 0, 0, 0.5);
}

.modal-block-game {
    background-color: rgba(0, 0, 0) !important;
    z-index: 10000;
}

.modal-container {
    width: calc(100% - var(--container-padding) * 2 - 40px);
    max-width: 400px;
	max-height: calc(80% - var(--container-padding) * 2 - 40px);
	overflow-y: auto;

    background-color: white;
	padding: 20px;
	border-radius: 10px;

    font-size: 14px;
}

.modal-large-text {
    font-size: 16px;
}

.modal-leaderboard-title {
    font-size: 22px;
    font-weight: bold;
}

.modal-leaderboard-points{
    margin-top:6px;

    font-size: 18px;
}

.leaderboard-user-icon {
    width: 125px;
    height: 125px;

    margin: 20px auto;
    
    color: #464646;
    background-color: #ededed;

    font-size: 60px;
}

.divider {
    width: 50%;
    max-width: 150px;
    height: 2px;
    background-color: var(--medium-accent-color-2);

    border-radius: 1px;

    margin: 30px auto;
}

.bottom-banner-container {
    position: fixed;
	bottom: var(--container-padding);
	left: var(--container-padding);
	right: var(--container-padding);

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.bottom-banner {
    width: calc(100% - var(--container-padding) * 2);
    max-width: 400px;

	z-index: 1000;

	padding: 30px 20px 20px 20px;

	background-color: rgba(255, 255, 255, 0.98);
	color: black;
	border: solid 1px rgba(0, 0, 0, 0.1);
	box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.2);

	animation: bottom-banner-animation 0.2s ease-out;
}
@keyframes bottom-banner-animation {
	from { transform: translateY(100%) }
	to   { transform: translateY(0) }
}

.animation-wrong-medium-suggestion {
    animation: animation-wrong-medium-suggestion-keyframes 0.4s 1 linear;
}
@keyframes animation-wrong-medium-suggestion-keyframes {
    0% { transform: translate(30px); }
    20% { transform: translate(-30px); }
    40% { transform: translate(15px); }
    60% { transform: translate(-15px); }
    80% { transform: translate(8px); }
    100% { transform: translate(0px); }
}

.animation-correct-medium-suggestion:nth-of-type(1) {
    animation:
        animation-correct-medium-suggestion-translate-keyframes-1 0.6s ease-in-out forwards,
        animation-correct-medium-suggestion-scale-keyframes 1.4s ease-in-out forwards;
}
.animation-correct-medium-suggestion:nth-of-type(2) {
    animation:
        animation-correct-medium-suggestion-translate-keyframes-2 0.6s ease-in-out forwards,
        animation-correct-medium-suggestion-scale-keyframes 1.4s ease-in-out forwards;
}
@keyframes animation-correct-medium-suggestion-translate-keyframes-1 {
    100% {
        translate: calc(50% - 20px) -40px;
    }
}
@keyframes animation-correct-medium-suggestion-translate-keyframes-2 {
    100% {
        translate: calc(-50% + 20px) 40px;
    }
}
@keyframes animation-correct-medium-suggestion-scale-keyframes {
    100% {
        scale: 1.4;
    }
}
