/* ============================================
   TRANSCENDENCE - Main Stylesheet
   Convention: BEM (Block__Element--Modifier)
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --color-primary: #ffc75e;
    --color-primary-hover: #ffc75e;
    --color-success: #3cff01;
    --color-success-dark: #ffc75e;
    --color-error: #ff4d4d;
    --color-warning: #ffc75e;
    --color-github: #ffc75e;

    --color-bg: #ffe5b5;

    --app-background-base: radial-gradient(
        circle at top,
        #fff787,
        #ff8080
    );

    --app-background-image: url("./assets/background.png");

    --color-surface: #ffefce;
    --color-surface-light: #ffc75e;
    --color-text: #000000;
    --color-text-muted: #000000;

    --font-size-base: 10px;
    --font-size-sm: 1.2rem;
    --font-size-md: 1.4rem;
    --font-size-lg: 1.6rem;
    --font-size-xl: 3rem;

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 12px;
    --radius-full: 50%;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    
    --z-menu: 2;
    --z-window: 100;
    --z-modal: 200;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    background-image: var(--app-background-image), var(--app-background-base);

    /* Make background image responsive but limited in size */
    background-size: clamp(400px, 100%, 800px) auto, cover;

    /* Align image to the top, gradient stays centered */
    background-position: center 35%, center;

    background-repeat: no-repeat, no-repeat;
}

/* html {
    height: 100%;
    background-image:
        var(--app-background-image),
        var(--app-background-base);

    background-size:
        80%,
        cover;

    background-position:
        50% 20%,
        center;

    background-repeat:
        no-repeat,
        no-repeat;
} */

body {
    margin: 0 auto;
    width: 70%;
    min-width: 800px;

    display: flex;
    flex-direction: column;
    min-height: 100vh; /* KEY */
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
   
.title {
    position: absolute;
    top: 20px;                  
    left: 50%;
    transform: translateX(-50%);
    text-transform: uppercase;

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

    font-size: var(--font-size-xl);
    text-align: center;
    text-shadow: 2px 2px 10px black;
    z-index: 1;
    font-family: "Roboto";
    letter-spacing: -10px;
    color: rgba(248, 252, 2, 0.6);

    margin: 0;
    padding: 0.6rem 1.2rem;

    background-color: #ffefce;
    border: 2px solid rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-lg);
}


/* ============================================
   MENU
   ============================================ */

.menu {
    position: fixed;
    top: var(--spacing-lg);
    left: 50px;

    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);

    z-index: var(--z-menu);
}

.menu__item {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-surface-light);
    border-radius: var(--radius-lg);
    border-color: #000;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.menu__item:hover {
    background: var(--color-surface-light);
    font-size: var(--font-size-lg);
}

.menu__item--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* ============================================
   GAME
   ============================================ */

/* .game {
    position: fixed;
    top: 0;
    right: 50px;
    padding: 0;
    margin: 0;
    z-index: var(--z-menu);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
} */

.game {
    position: fixed;
    top: var(--spacing-lg);
    right: 50px;

    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);

    z-index: var(--z-menu);
}

.game__item {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-surface-light);
    border-radius: var(--radius-lg);
    border-color: #000;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.game__item:hover {
    background: var(--color-surface-light);
    font-size: var(--font-size-lg);
}

.game__item--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* ///////////////////////////////////////////////////////// */

footer {
    margin-top: auto; /* pushes footer to bottom */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer_div {
    display: flex;
    justify-content: center;
    gap: 30%; /* space between items */
    padding: 10px 0;
}

.footer_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center; /* center each column */
    align-items: center;
    gap: 10px 60px; /* row gap / column gap */
}

.ico_footer {
    width: 25%;
}

a {
    text-decoration: none;
    color: #000000;
}
a:hover {
    color: rgb(218, 145, 12);
}

.legal {
    margin-top: 5%;
    padding-bottom: 5%;
    text-align: center;
    display: block;
    color: #000000;
}

.legal:hover {
    color: rgb(218, 145, 12);
}

/* ///////////////////////////////////////////////////////// */

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-md);
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-text);
}

.btn--primary:hover {
    background: var(--color-primary-hover);
}

.btn--secondary {
    background: var(--color-surface-light);
    color: var(--color-text);
}

.btn--success {
    background: var(--color-success-dark);
    color: var(--color-text);
}

.btn--danger {
    background: var(--color-error);
    color: var(--color-text);
}

.btn--github {
    background: var(--color-github);
    color: var(--color-text);
}

.btn--ghost {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-surface-light);
}

/* ============================================
   INPUTS
   ============================================ */
.input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-md);
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-surface-light);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.input::placeholder {
    color: var(--color-text-muted);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* ============================================
   WINDOWS
   ============================================ */
.window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg);
    color: var(--color-text);
    z-index: var(--z-window);
    display: none;
    flex-direction: column;
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    border-radius: 5px;
    border-color: #aa1f1f;
    border: 6px solid #faac37;
}

.window--visible {
    display: flex;
}

.window--left {
    left: 25%;
}

.window--right {
    left: 75%;
}

.window__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-surface);
    cursor: move;
    user-select: none;
}

.window__title {
    font-weight: 500;
    font-size: var(--font-size-md);
}

.window__close {
    cursor: pointer;
    font-size: var(--font-size-lg);
    opacity: 0.8;
    transition: opacity var(--transition-fast);
    background: none;
    border: none;
    color: var(--color-text);
    padding: 0;
    line-height: 1;
}

.window__close:hover {
    opacity: 1;
}

.window__body {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex: 1;
    overflow: auto;
}

/* ============================================
   MESSAGES
   ============================================ */
.message {
    font-size: var(--font-size-sm);
    padding: var(--spacing-xs);
    border-radius: var(--radius-lg);
    border-color: #000;
}

.message--success {
    color: var(--color-success);
}

.message--error {
    color: var(--color-error);
}

.message--info {
    color: var(--color-text-muted);
}

/* ============================================
   LOGIN WINDOW
   ============================================ */
.login {
    width: 320px;
}

.login__form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.login__actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

.login__divider {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin: var(--spacing-sm) 0;
}

.login__divider::before,
.login__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-surface-light);
}

/* ============================================
   CHAT WINDOW
   ============================================ */
.chat {
    width: 380px;
    height: 400px;
}

.chat__output {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-sm);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    min-height: 150px;
}

.chat__message {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--color-surface-light);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
}

.chat__message--own {
    background: var(--color-primary);
    align-self: flex-end;
}

.chat__friend-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    margin-right: var(--spacing-xs);
    vertical-align: middle;
}

.chat__system {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-style: italic;
    text-align: center;
}

.chat__system--error {
    color: var(--color-error);
}

.chat__system--success {
    color: var(--color-success);
}

.chat__input-container {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.chat__input {
    flex: 1;
}

.chat__controls {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

/* ============================================
   AVATAR WINDOW
   ============================================ */
.avatar-window {
    width: 360px;
}

.avatar__preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-full);
    border: 3px solid var(--color-text);
    box-shadow: var(--shadow-md);
    background: var(--color-surface);
    align-self: center;
}

.avatar__username {
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-align: center;
    color: var(--color-text);
    margin-top: var(--spacing-sm);
}

.avatar__controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

.avatar__file-input {
    display: none;
}

/* ============================================
   STATS WINDOW
   ============================================ */
.stats-window {
    width: 320px;
}

.stats__avatar {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-text);
    align-self: center;
    display: block;
    margin: 0 auto var(--spacing-xs);
}

.stats__username {
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-align: center;
    color: #000;
    margin-bottom: var(--spacing-md);
}

.stats__section {
    margin-bottom: var(--spacing-md);
}

.stats__section-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    border-bottom: 1px solid var(--color-surface-light);
    padding-bottom: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
}

.stats__section-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stats__row {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-sm);
    padding: 3px 0;
}

.stats__label {
    color: #333;
}

.stats__value {
    font-weight: 600;
    color: #000;
}

.stats__loading {
    font-size: var(--font-size-sm);
    color: #333;
    text-align: center;
    padding: var(--spacing-sm) 0;
}

/* ============================================
   EASTER EGG BUTTON
   ============================================ */
/* .easter-egg {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-surface-light);
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    font-size: var(--font-size-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.easter-egg:hover {
    background: var(--color-error);
    border-color: var(--color-error);
} */

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

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

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

/* ============================================
   FRIENDS WINDOW
   ============================================ */
.friends-window {
    width: 400px;
    height: 450px;
}

.friends__tabs {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.friends__tab {
    flex: 1;
    padding: var(--spacing-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-surface-light);
    color: var(--color-text);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}

.friends__tab:hover {
    background: var(--color-surface-light);
}

.friends__tab--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.friends__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.friends__search {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.friends__search .input {
    flex: 1;
}

.friends__list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.friends__item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--color-surface);
    border-radius: var(--radius-md);
}

.friends__avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--color-surface-light);
}

.friends__name {
    flex: 1;
    font-size: var(--font-size-md);
    font-weight: 500;
}

.friends__actions {
    display: flex;
    gap: var(--spacing-xs);
}

.friends__actions .btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.friends__empty {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--spacing-lg);
}

.container-1 {
	display: flex;
	justify-content: center;
	align-items: center;

	width: 100%;
	margin: 5px;
	position: relative;
	min-height: 200px;
}

/* ///////////////////////////////////////////////////////// */

.button {
	color: red;
	margin: 5px 50px;
	padding: 5px 50px;
}

.button-1 {
    display: inline-block;
    padding: 10px 20px;
    background-color: #000000;
    color: #8e8e8e;
    text-align: center;
    text-decoration: none;

    font-size: 16px;
    cursor: pointer;
    border: 3px solid #363636;
    border-radius: 6px;
    transition: background-color 0.3s;

}
.button-1:hover {
    background-color: rgb(202, 135, 10);
    color: black;
}
