* {
    box-sizing: border-box;
}

html {
    background: #0f0f0f !important;
    background-image: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
}

html, body {
    background: #0f0f0f !important;
    background-image: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%) !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100% !important;
    overflow-x: hidden !important;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    z-index: -1;
}

.container {
    max-width: 90%;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: #1c1c1c;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    overflow: hidden;
    border: 1px solid #333;
    margin-top: 20px;
    margin-bottom: 20px;
}

.header {
    background: #181818;
    padding: 20px 15px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-family: 'Pacifico', 'Billabong', cursive, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #fff;
    font-size: 2.2rem;
    letter-spacing: 1px;
    margin: 0;
}

.ghost-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    margin: 0 auto 10px;
    position: relative;
}

.ghost-icon::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    top: 16px;
    left: 15px;
}

.ghost-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    top: 16px;
    right: 15px;
}

.main-content {
    padding: 25px 20px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #333;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 15px;
    box-sizing: border-box;
    background: #232323;
    color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #dd2a7b;
}

.form-control::placeholder {
    color: #888;
}

.option-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 20px 0;
}

.option-card-new {
    border: 2px solid #dd2a7b;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #232323;
    color: #fff;
    box-shadow: none;
}


.option-card {
    border: 2px solid #333;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #232323;
    color: #fff;
    box-shadow: none;
}

.option-card:hover {
    border-color: #dd2a7b;
    background: #262626;
    transform: translateY(-2px);
}

.option-card.selected {
    border-color: #dd2a7b;
    background: #262626;
}

.option-card p {
    color: #bdbdbd;
    margin: 0;
}

.option-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

strong{
    color: #dd2a7b;
}

.btn-primary {
    background: #dd2a7b;
    color: #fff;
    border: none;
    box-shadow: none;
}

.btn-primary:hover {
    background: #c13584;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #333;
    color: #888;
    cursor: not-allowed;
    transform: none;
}

.console {
    background: #2a2a2a;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    margin: 20px 0;
    min-height: 200px;
    border: 1px solid #333;
}

.disclaimer, .parody-notice, .processing-text {
    background: #232323;
    color: #dd2a7b;
    border: 1px solid #333;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.device-card {
    border: 2px solid #333;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #2a2a2a;
    color: white;
}

.device-card:hover, .device-card.selected {
    border-color: #FFFC00;
    background: #333;
}

.device-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

h1, h2, h3 {
    color: #fff;
}

.parody-notice {
    background: #2a2a2a;
    color: #dd2a7b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    text-align: center;
    border: 1px solid #333;
}

.processing-text {
    background: #2a2a2a;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #333;
    text-align: center;
}

.loading-dots {
    display: inline-block;
    width: 20px;
    text-align: left;
}

.loading-dots::after {
    content: '';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

.progress-bar-outer {
    width: 100%;
    height: 18px;
    background: #333;
    border-radius: 10px;
    margin: 18px 0 0 0;
    overflow: hidden;
    border: 1px solid #dd2a7b;
    box-shadow: none;
}

.progress-bar-inner {
    height: 100%;
    width: 0%;
    background: #dd2a7b;
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(.4,2,.6,1);
    box-shadow: none;
}

/* Confetti effect */
.confetti {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* Success popup */
#successPopup {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: popupFadeIn 0.7s;
}

@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-content {
    background: #232323;
    color: #fff;
    border-radius: 30px;
    padding: 50px 30px 40px 30px;
    text-align: center;
    box-shadow: 0 0 60px #dd2a7b33, 0 0 0 8px #232323;
    position: relative;
    animation: popScale 0.7s cubic-bezier(.4,2,.6,1);
    margin: 0 16px;
}

@keyframes popScale {
    0% { transform: scale(0.7); }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.success-content p {
    font-size: 1.2rem;
    color: #fff;
}

.success-emoji {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: emojiBounce 1.2s infinite alternate;
    color: #dd2a7b;
}

@keyframes emojiBounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-18px); }
}

/* Site-wide effect after success */
.crazy-effect {
    animation: crazyBorder 0.15s infinite alternate, crazyBg 2s infinite linear;
    box-shadow: 0 0 40px 10px #FFFC00, 0 0 0 8px #fff700;
}

@keyframes crazyBorder {
    0% { box-shadow: 0 0 40px 10px #FFFC00, 0 0 0 8px #fff700; }
    100% { box-shadow: 0 0 80px 20px #fff700, 0 0 0 16px #FFFC00; }
}

@keyframes crazyBg {
    0% { background-position: 0 0; }
    100% { background-position: 100vw 100vh; }
}

#errorPopup > div {
    margin: 0 16px;
}

.photo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.photo-card {
    background: #232323;
    border: 2px solid #dd2a7b;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: column;
    overflow: hidden;
}

.photo-card .snap-logo {
    background: #dd2a7b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    margin-bottom: 8px;
}

.photo-card .snap-logo svg {
    width: 32px;
    height: 32px;
    display: block;
}

.photo-card .photo-bar {
    width: 100%;
    height: 18px;
    background: #eee;
    position: absolute;
    bottom: 0;
    left: 0;
    border-top: 1px solid #ddd;
}

.photo-grid-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.92);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.photo-grid-title {
    color: #dd2a7b;
    font-size: 1.3rem;
    margin-bottom: 18px;
    text-align: center;
    letter-spacing: 1px;
}

.photo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.photo-card {
    width: 90px;
    height: 110px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: column;
    border: 2px solid #FFFC00;
    overflow: hidden;
}

.photo-card .spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #dd2a7b;
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 24px;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.photo-card .photo-bar {
    width: 100%;
    height: 18px;
    background: #eee;
    position: absolute;
    bottom: 0;
    left: 0;
    border-top: 1px solid #ddd;
}

.error-popup-content {
    background: #dd2a7b;
    color: #fff;
    border-radius: 22px;
    padding: 44px 24px 32px 24px;
    text-align: center;
    box-shadow: none;
    max-width: 95vw;
    border: 1.5px solid #fff;
    margin: 0 16px;
}

.error-popup-content h1 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: #fff;
    font-weight: 700;
}

.error-popup-content p {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 24px;
}

.error-popup-content .shield {
    font-size: 3.2rem;
    color: #fff;
    margin-bottom: 10px;
    display: block;
}

.error-popup-content .btn {
    background: #fff !important;
    color: #dd2a7b !important;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    box-shadow: none;
    width: 70%;
    margin: 0 auto;
    display: block;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.bestfriends-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.92);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.bestfriends-title {
    color: #dd2a7b;
    font-size: 1.3rem;
    margin-bottom: 18px;
    text-align: center;
    letter-spacing: 1px;
}

.bestfriends-list {
    background: #232323;
    box-shadow: none;
    min-width: 320px;
    max-width: 98vw;
    min-height: 370px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.bestfriend-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 18px 0;
    width: 100%;
    max-width: 260px;
}

.profile-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    box-shadow: none;
    border: none;
    filter: none;
    margin-right: 0;
    margin-left: 0;
    padding: 0;
}

.profile-circle .spinner {
    width: 28px;
    height: 28px;
    border: 4px solid #dd2a7b;
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.bestfriend-name {
    font-size: 1.15rem;
    color: #fff;
    filter: blur(2.5px) brightness(1.2);
    user-select: none;
    background: #262626;
    border-radius: 8px;
    padding: 10px 18px;
    width: 100%;
    display: block;
    text-align: left;
    letter-spacing: 0.5px;
    text-shadow: none;
    opacity: 0.95;
    border: none;
    margin: 0;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 400px;
  margin: 0 auto;
}
.activity-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: #232323;
  border-radius: 14px;
  padding: 18px 16px 13px 16px;
  box-shadow: 0 2px 12px #0005;
}
.activity-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #feda75;
  background: #111;
  margin-right: 14px;
  margin-bottom: 0;
}
.activity-text {
  color: #fff;
  font-size: 1.08rem;
  width: 100%;
}
.activity-user {
  font-weight: 600;
  color: #feda75;
}
.activity-time {
  color: #aaa;
  font-size: 0.98rem;
  margin-left: 6px;
}

/* Mobile specific fixes */
@media (max-width: 480px) {
    html, body {
        background: #0f0f0f !important;
        background-image: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%) !important;
        background-attachment: fixed !important;
        width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .container {
        margin: 10px auto;
        max-width: 95%;
        border-radius: 15px;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .ghost-icon {
        width: 40px;
        height: 40px;
    }
    
    .ghost-icon::before, .ghost-icon::after {
        width: 5px;
        height: 5px;
        top: 12px;
    }
    
    .ghost-icon::before {
        left: 12px;
    }
    
    .ghost-icon::after {
        right: 12px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 16px;
    }
    
    .option-card {
        padding: 15px;
    }
    
    .form-control {
        padding: 12px;
    }
    
    #successPopup .success-content, #errorPopup > div {
        padding: 30px 8px 25px 8px !important;
        border-radius: 18px !important;
        margin: 0 6px !important;
        font-size: 1rem;
    }
    
    #successPopup .success-content h1, #errorPopup h1 {
        font-size: 1.3rem !important;
    }
    
    #successPopup .success-content p, #errorPopup p {
        font-size: 1rem !important;
    }
    
    .success-emoji, #errorPopup div > div {
        font-size: 2.2rem !important;
    }
    
    .photo-card {
        width: 64px;
        height: 78px;
    }
    
    .photo-card .snap-logo {
        width: 32px;
        height: 32px;
        margin-top: 10px;
        margin-bottom: 4px;
    }
    
    .photo-card .snap-logo svg {
        width: 20px;
        height: 20px;
    }
    
    .photo-card .spinner {
        width: 22px;
        height: 22px;
        margin-top: 10px;
        margin-bottom: 4px;
    }
    
    .error-popup-content {
        padding: 24px 6px 18px 6px !important;
        border-radius: 14px !important;
        font-size: 1rem;
        margin: 0 6px !important;
    }
    
    .error-popup-content h1 {
        font-size: 1.1rem !important;
    }
    
    .error-popup-content p {
        font-size: 0.95rem !important;
    }
    
    .error-popup-content .shield {
        font-size: 2rem !important;
    }
    
    .error-popup-content .btn {
        font-size: 1rem !important;
        width: 100%;
    }
    
    .bestfriends-list {
        padding: 18px 4px 18px 4px;
        border-radius: 14px;
        min-width: 90vw;
        min-height: 220px;
    }
    
    .bestfriend-row {
        gap: 10px;
        max-width: 98vw;
    }
    
    .profile-circle {
        width: 26px;
        height: 26px;
    }
    
    .profile-circle .spinner {
        width: 18px;
        height: 18px;
    }
    
    .bestfriend-name {
        font-size: 0.95rem;
        padding: 7px 8px;
    }
}