@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #ffffff;
    --text-color: #212121;
    --card-bg: #f4f4f4;
    --border-color: #ccc;
    --primary-color: #D153C2;
    --hoover-color: #ff5cec;
    --selected-start: #ff6ec7;
    --selected-end: #8a2be2;
}

/* Dark theme */
.dark-mode {
    --primary-color: #FF63ED;
    --hoover-color: #d154c3;
    --bg-color: #121212;
    --text-color: #ffffff;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --selected-start: #ff7fcf;
    --selected-end: #9b6bff;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 20px;
    transition: background 0.3s, color 0.3s;
}

.controls-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.lang-flag {
    appearance: none;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    padding: 6px 10px;
    font-size: 18px;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 160ms ease, box-shadow 200ms ease;
    position: relative;
    overflow: hidden;
}

.lang-flag .flag-emoji {
    font-size: 20px;
    line-height: 1;
}

.lang-flag:focus {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.lang-flag:hover {
    transform: translateY(-2px);
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

hr {
    border: 0;
    height: 2px;
    background-color: var(--border-color);
    margin-bottom: 38px;
}

.container {
    max-width: 1200px;
    margin: auto;
    text-align: left;
}

.layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.sidebar {
    width: 250px;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

.sidebar h2 {
    font-size: 20px;
    color: var(--text-color);
    margin-bottom: 15px;
}

.device-button {
    width: 100%;
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.25s, transform 0.15s, box-shadow 0.25s;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.10),
        0 2px 6px rgba(0, 0, 0, 0.06);
    --glow-h: 300;
}

span.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 4000ms cubic-bezier(.22, .9, .27, 1) forwards;
    background-color: rgba(255, 255, 255, 0.75);
    pointer-events: none;
    will-change: transform, opacity;
    z-index: 3;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.device-button:hover {
    background-color: var(--hoover-color);
}

.device-button::after {
    content: "";
    position: relative;
    overflow: hidden;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.device-button:active::after {
    transform: scale(4);
    opacity: 0;
}

.content-area {
    flex-grow: 1;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    min-height: 150px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.content.hidden {
    display: none;
}

.collapsible {
    background: none;
    color: inherit;
    font-size: 18px;
    padding: 5px 0;
    text-align: left;
    cursor: pointer;
    border: none;
    width: 100%;
    display: block;
    margin: 5px 0;
    position: relative;
    overflow: hidden;
}

.collapsible:focus {
    outline: none;
    color: var(--primary-color);
}

.collapsible span.material-icons {
    font-size: 18px;
    vertical-align: middle;
    margin-left: 10px;
}

.collapsible.active+.content {
    display: block;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.content.fade-in {
    opacity: 0;
    transform: scale(0.9);
    animation: fadeInScale 0.5s forwards;
}

.content.fade-out {
    opacity: 0;
    transform: scale(0.9);
    animation: fadeOutScale 0.15s forwards;
}

.toggle-theme {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 8px;
    overflow: hidden;
}

.toggle-theme .material-icons {
    font-size: 24px;
}

.content-area.fade-in {
    opacity: 0;
    transform: scale(0.9);
    animation: fadeInScale 0.5s forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: scale(0.9);
    }

    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

#device-content {
    padding-top: 5px;
}

.content.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

.device-p {
    text-align: center;
}

.MPTR {
    text-align: center;
    vertical-align: bottom;
    font-size: small;
    color: #858585;
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}

.os-gradient {
    background: linear-gradient(270deg, var(--selected-start), var(--selected-end), var(--selected-start));
    background-size: 600% 600%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 12s linear infinite;
    display: inline-block;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.device-button.selected {
    background-image: linear-gradient(90deg, var(--selected-start), var(--selected-end));
    color: #fff;
    transform: translateY(-2px);
    border: none;
    box-shadow:
        0 14px 36px rgba(0, 0, 0, 0.16),
        0 0 12px hsla(300 90% 60% / 0.28),
        0 0 30px hsla(280 90% 60% / 0.18);
    animation: pulseGlow 3.0s ease-in-out infinite;
    will-change: box-shadow, transform;
}

.dark-mode .device-button {
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.16);
}

.dark-mode .device-button.selected {
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.48),
        0 0 16px hsla(300 90% 65% / 0.30),
        0 0 40px hsla(280 90% 65% / 0.22);
    animation: pulseGlowDark 3.0s ease-in-out infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow:
            0 14px 36px rgba(0, 0, 0, 0.16),
            0 0 8px hsla(300 90% 60% / 0.18),
            0 0 18px hsla(280 90% 60% / 0.10);
        transform: translateY(-1px);
    }

    50% {
        box-shadow:
            0 16px 40px rgba(0, 0, 0, 0.18),
            0 0 18px hsla(300 90% 60% / 0.36),
            0 0 42px hsla(280 90% 60% / 0.24);
        transform: translateY(-3px);
    }

    100% {
        box-shadow:
            0 14px 36px rgba(0, 0, 0, 0.16),
            0 0 8px hsla(300 90% 60% / 0.18),
            0 0 18px hsla(280 90% 60% / 0.10);
        transform: translateY(-1px);
    }
}

@keyframes pulseGlowDark {
    0% {
        box-shadow:
            0 16px 40px rgba(0, 0, 0, 0.48),
            0 0 10px hsla(300 90% 65% / 0.20),
            0 0 26px hsla(280 90% 65% / 0.12);
        transform: translateY(-1px);
    }

    50% {
        box-shadow:
            0 18px 44px rgba(0, 0, 0, 0.50),
            0 0 22px hsla(300 90% 65% / 0.40),
            0 0 50px hsla(280 90% 65% / 0.28);
        transform: translateY(-3px);
    }

    100% {
        box-shadow:
            0 16px 40px rgba(0, 0, 0, 0.48),
            0 0 10px hsla(300 90% 65% / 0.20),
            0 0 26px hsla(280 90% 65% / 0.12);
        transform: translateY(-1px);
    }
}