:root {
    --bg-color: #f5f5f5;
    --text-color: #333;
    --toggle-bg: #ddd;
    --toggle-circle: #fff;
    --link-color: #0056b3;
}

.dark-mode {
    --bg-color: #222;
    --text-color: #f5f5f5;
    --toggle-bg: #555;
    --toggle-circle: #aaa;
    --link-color: #4dabf7;
}

/* Base Elements */
html {
    background-color: var(--bg-color);
    transition: background-color 0.3s;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    transition: color 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    background-color: var(--bg-color);
    position: relative;
    overflow-x: hidden;
}

/* Typography */
h1, h2 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    margin: 0;
    word-break: break-word;
    max-width: 90vw;
}

.fingerprint {
    font-family: monospace;
    font-weight: bold;
    word-break: break-word;
    position: relative;
    z-index: 3;
}

/* Layout Components */
.page-title {
    text-align: center;
    margin: 0 auto;
    padding: 2.5em 1rem 1rem;
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    max-width: 800px;
    width: 100%;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
    box-sizing: border-box;
}

.container {
    text-align: center;
    max-width: 1080px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px 20px;
    margin: 30px auto 0;
    min-height: 400px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.gap {
    height: 30px;
}

h2 {
    position: relative;
    z-index: 3;
    padding: 10px;
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    height: 30px;
}

.toggle-switch {
    width: 60px;
    height: 30px;
    background-color: var(--toggle-bg);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-block;
    vertical-align: middle;
}

.toggle-circle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: var(--toggle-circle);
    border-radius: 50%;
    transition: transform 0.3s;
}

.dark-mode .toggle-circle {
    transform: translateX(30px);
}

.toggle-label {
    margin-right: 10px;
    vertical-align: middle;
}

.theme-toggle img {
    filter: invert(0);
}

.dark-mode .theme-toggle img {
    filter: invert(1);
}

/* QR Code */
.qr-code img {
    width: 100%;
    max-width: 352px;
    height: auto;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}


.social-icon a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    transition: transform 0.2s, opacity 0.2s;
    color: var(--text-color);
}

.social-icon svg {
    width: 26px;
    height: 26px;
    fill: var(--text-color);
    stroke: var(--text-color);
}

/* Help Link */
.help-link {
    text-align: center;
    width: 100%;
    font-size: 0.9rem;
    padding: 20px 0;
    position: relative;
    margin-top: auto;
    flex-shrink: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.help-link p {
    margin: 0;
}

.help-link a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0 5px;
}

.help-link a:hover {
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
        padding-top: 3em;
        padding-bottom: 0.5rem;
        max-width: calc(100% - 40px);
    }

    .container {
        padding-top: 30px;
        margin-top: 30px;
    }
}

@media (max-width: 360px) {
    .page-title {
        padding-top: 3.5em;
        font-size: 1.8rem;
    }
}
