* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #101010;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    perspective: 1000px;
    overflow: hidden;
    position: relative;
}

/* Checkbox hack for click-to-flip */
#flip-toggle {
    display: none;
}

.card-container {
    position: relative;
    width: 350px;
    height: 500px;
    cursor: grab;
    padding: 10px;
}

.card-container:active {
    cursor: grabbing;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}


/* Smooth transition for flip */
.card-inner {
    transition: transform 0.6s ease;
}

/* Flip card when checkbox is checked */
#flip-toggle:checked ~ .card-container .card-inner {
    transform: rotateY(180deg);
}

/* Card thickness - create edges */
.card-inner::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    background: linear-gradient(135deg, #f5f5f0 0%, #e8e8e3 100%);
    top: -8px;
    left: 0;
    transform-origin: bottom;
    transform: rotateX(90deg);
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-inner::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    background: linear-gradient(135deg, #f5f5f0 0%, #e8e8e3 100%);
    bottom: -8px;
    left: 0;
    transform-origin: top;
    transform: rotateX(-90deg);
    border-radius: 0 0 16px 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}


.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f0 100%);
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Subtle @ symbol background pattern */
.at-background {
    display: none;
}

/* Animated gradient overlay - only on @ symbols */
.at-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 235, 59, 0.25) 25%,
        rgba(255, 192, 203, 0.3) 50%,
        rgba(255, 235, 59, 0.25) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: gradient-shine 8s ease-in-out infinite;
    mask-image: url("data:image/svg+xml,%3Csvg width='35' height='35' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='17.5' y='17.5' font-family='Inter, sans-serif' font-size='32' font-weight='300' fill='white' text-anchor='middle' dominant-baseline='middle'%3E@%3C/text%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='35' height='35' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='17.5' y='17.5' font-family='Inter, sans-serif' font-size='32' font-weight='300' fill='white' text-anchor='middle' dominant-baseline='middle'%3E@%3C/text%3E%3C/svg%3E");
    mask-repeat: repeat;
    -webkit-mask-repeat: repeat;
    mask-size: 35px 35px;
    -webkit-mask-size: 35px 35px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.75;
}

@keyframes gradient-shine {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Cutout background circles to cover background layers */
.cutout-background {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #101010;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 0 0 3px #101010;
}

.cutout-background-top {
    top: -25px;
}

.cutout-background-bottom {
    bottom: -25px;
}

/* Circular cutouts */
.card-cutout {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #101010;
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 0 0 3px #101010;
    border: none;
    filter: none;
}

.card-cutout-top {
    top: -20px;
    z-index: 20;
}

.card-cutout-bottom {
    bottom: -20px;
    background: #101010 !important;
    box-shadow: 0 0 0 3px #101010 !important;
    filter: none;
    z-index: 20;
}

.cutout-at {
    position: absolute;
    top: 2px;
    right: 6px;
    font-size: 12px;
    color: #000000;
    font-weight: 300;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    z-index: 11;
    pointer-events: none;
    line-height: 1;
}

.card-face.card-back {
    justify-content: flex-start;
    padding-top: 50px;
    padding-bottom: 30px;
    gap: 0;
}



/* Left edge */
.card-face::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f0 0%, #e8e8e3 100%);
    left: -8px;
    top: 0;
    transform-origin: right;
    transform: rotateY(-90deg);
    border-radius: 16px 0 0 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Right edge */
.card-face::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f0 0%, #e8e8e3 100%);
    right: -8px;
    top: 0;
    transform-origin: left;
    transform: rotateY(90deg);
    border-radius: 0 16px 16px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #f5f5f0 0%, #fafafa 100%);
}

/* Zip cut on back side */
.back-zip-cut {
    position: absolute;
    left: -30px;
    right: -30px;
    bottom: 80px;
    width: calc(100% + 60px);
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        #000000 0px,
        #000000 8px,
        transparent 8px,
        transparent 16px
    );
    z-index: 10;
    pointer-events: none;
}


/* Zip cut on front side */
.front-zip-cut {
    position: absolute;
    left: -30px;
    right: -30px;
    bottom: 80px;
    width: calc(100% + 60px);
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        #000000 0px,
        #000000 8px,
        transparent 8px,
        transparent 16px
    );
    z-index: 10;
    pointer-events: none;
}

/* Big @ logo on front */
.at-logo {
    font-size: 180px;
    font-weight: 300;
    color: #000000;
    line-height: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: absolute;
    top: calc((0px + (100% - 80px)) / 2);
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

/* Small @ logo on back upper right */
.at-logo-back {
    position: absolute;
    right: 30px;
    top: 50px;
    font-size: 60px;
    font-weight: 300;
    color: #000000;
    line-height: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    pointer-events: none;
    z-index: 10;
}

/* Back side sections */
.back-section {
    width: 100%;
    margin-bottom: 24px;
    position: relative;
    z-index: 10;
}

.back-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2px;
}

.back-section-label {
    font-size: 12px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    align-self: flex-start;
}

.back-section-logo {
    font-size: 48px;
    color: #000000;
    font-weight: 300;
    line-height: 1;
    align-self: flex-start;
}

.back-section-value {
    font-size: 28px;
    color: #000000;
    font-weight: 500;
    margin-top: 0;
    align-self: flex-start;
}

.profile-section {
    display: flex;
    flex-direction: column;
    margin-top: auto;
    padding-top: 0;
    padding-bottom: 0px;
    margin-bottom: -10px;
    width: 100%;
    position: relative;
    z-index: 10;
}



.profile-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.profile-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-badge {
    font-size: 12px;
    color: #666666;
    display: flex;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.profile-picture {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-username {
    font-size: 12px;
    color: #000000;
    font-weight: 500;
}

.checkmark-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.profile-username .checkmark {
    color: #ffffff;
    font-size: 10px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-badge .badge-gap {
    display: inline-block;
    width: 2rem;
}



.back-home-button {
    position: fixed;
    top: calc(50% + 280px);
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    z-index: 1000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.back-home-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%) translateY(2px);
}

/* Responsive */
@media (max-width: 480px) {
    .card-container {
        width: 300px;
        height: 450px;
    }

    .at-logo {
        font-size: 140px;
    }
    
    .back-section-value {
        font-size: 24px;
    }

    .back-home-button {
        top: calc(50% + 250px);
        left: 50%;
        transform: translateX(-50%);
        font-size: 12px;
        padding: 8px 12px;
    }

    .back-home-button:hover {
        transform: translateX(-50%) translateY(2px);
    }
}
