:root {
    --primary-color: #ffb7c5; /* Sakura Pink */
    --secondary-color: #ffffff;
    --text-color: #5d5d5d;
    --glass-bg: rgba(255, 255, 255, 0.1); /* Fully transparent - 0.1 opacity */
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: rgba(255, 182, 193, 0.1);
    --bg-image: url('https://raw.githubusercontent.com/NethumKaushalya/anime-assets/main/sakura_bg.jpg'); /* Fixed Working URL */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #ffdee5; /* Fallback color */
}

/* Fixed Background optimization */
.fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(rgba(255, 245, 247, 0.2), rgba(255, 222, 229, 0.2)), var(--bg-image);
    background-size: cover;
    background-position: center;
    transform: translateZ(0); /* Hardware acceleration */
    backface-visibility: hidden;
}

/* Sakura Canvas */
#sakura-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Transparency Controls */
.controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    background: rgba(255, 143, 163, 0.4);
    backdrop-filter: blur(15px);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#transparency-slider {
    -webkit-appearance: none;
    width: 150px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

#transparency-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#transparency-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px); /* Reduced blur for performance */
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 2px solid rgba(0, 0, 0, 0.5);
    padding: 1rem 2rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: 'Pacifico', cursive;
    font-size: 2.2rem;
    font-weight: 400;
    color: #ff8fa3;
    text-transform: none; /* Removed uppercase for stylish cursive look */
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ff8fa3;
}

.login-btn {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    transition: all 0.3s !important;
}

.login-btn:hover {
    background: #ff8fa3 !important;
    color: white !important;
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none; /* Reset to hidden by default */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Darker backdrop for better focus */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    margin: 8% auto;
    width: 92%;
    max-width: 420px;
    animation: modalFadeIn 0.4s ease-out;
    text-align: center;
    background: rgba(255, 255, 255, 0.25); /* Increased opacity for better visibility */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 0, 0, 0.6); /* Stronger border */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-radius: 25px;
    padding: 3rem 2rem;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #5d5d5d;
    cursor: pointer;
}

.close-btn:hover {
    color: #ff708d;
}

.stylish-title {
    font-family: 'Pacifico', cursive;
    color: #ff708d;
    margin-bottom: 2rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff8fa3;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    background: rgba(255, 255, 255, 0.4); /* More visible background for inputs */
    border: 2px solid rgba(0, 0, 0, 0.2); /* Clearer border for inputs */
    border-radius: 12px;
    color: #000000; /* Black text for maximum readability */
    font-weight: 600;
    outline: none;
    transition: all 0.3s;
}

.input-group input::placeholder {
    color: rgba(0, 0, 0, 0.6); /* Darker placeholder */
}

.input-group input:focus {
    border-color: #ff708d;
    background: rgba(255, 255, 255, 0.6);
}

.switch-auth {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.switch-auth a {
    color: #ff708d;
    text-decoration: none;
    font-weight: bold;
}

/* User Dropdown Styles */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    width: 200px;
    padding: 1.5rem !important;
    border-radius: 15px !important;
    z-index: 1001;
    text-align: left !important;
    animation: fadeIn 0.3s ease-out;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-header {
    margin-bottom: 1rem;
}

.dropdown-header p {
    font-weight: 700;
    color: #ff708d;
    font-size: 0.9rem;
    margin: 0;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0.8rem 0;
}

.dropdown-item {
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    color: #ff708d;
}

/* Success Notification Styles */
.premium-notify {
    position: fixed;
    top: -100px; /* Hidden by default */
    left: 50%;
    transform: translateX(-50%);
    z-index: 11000;
    padding: 1rem 2rem !important;
    min-width: 300px;
    transition: top 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid #ffd700 !important; /* Gold border for premium */
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2) !important;
}

.premium-notify.active {
    top: 30px;
}

.notify-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notify-content i {
    font-size: 2rem;
    color: #4CAF50;
}

.notify-text .main-msg {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
}

.notify-text .sub-msg {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    color: #5d5d5d;
}

.premium-tag {
    color: #ff708d;
    font-weight: 800;
    text-shadow: 0 0 5px rgba(255, 112, 141, 0.3);
}

/* Admin Dashboard Tabs */
.admin-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.1);
    padding: 5px;
    border-radius: 15px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 8px 20px;
    color: var(--text-color);
    font-weight: bold;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #ff8fa3;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 143, 163, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

main {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Glassy Card Style */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
    padding: 3rem;
    margin-bottom: 2rem;
    transform: translateZ(0); /* Hardware acceleration */
}

.hero {
    text-align: center;
}

.hero h1 {
    font-family: 'Pacifico', cursive;
    font-size: 5rem;
    color: #ff708d;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.1);
}

.hero-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.3);
    color: #ff708d;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: #ff8fa3;
    color: white;
    transform: translateY(-3px);
}

.session-info {
    margin: 1.5rem auto !important;
    padding: 1rem 2rem !important;
    max-width: 500px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed rgba(0, 0, 0, 0.3) !important;
}

.session-info p {
    margin: 0;
    font-family: monospace;
    font-weight: 700;
    color: #5d5d5d;
}

#session-id-text {
    color: #ff708d;
    word-break: break-all;
}

.copy-btn {
    background: #ff8fa3;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 10px;
}

.copy-btn:hover {
    background: #ff708d;
}

.hero-btn {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
}

.hero-btn {
    background: #ff8fa3;
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(255, 143, 163, 0.4);
    display: inline-block;
    text-decoration: none;
}

.hero-btn:hover {
    transform: scale(1.05);
    background: #ff708d;
}

section h2 {
    color: #ff708d;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2.5rem;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px); /* Reduced blur on scrollable cards */
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s;
    transform: translateZ(0); /* Hardware acceleration */
}

.card:hover {
    transform: translateY(-10px);
}

.card h3 {
    color: #ff8fa3;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

footer {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

/* Session Panel Styles */
.session-container {
    margin-top: 2rem;
    padding: 2rem !important;
    text-align: center;
    border: 2px solid #ff708d !important;
    position: relative;
    animation: fadeIn 0.4s ease-out;
}

.session-methods {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.method-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-color);
    transition: all 0.3s;
}

.method-btn.active {
    background: #ff708d;
    color: white;
    border-color: #ff708d;
    box-shadow: 0 4px 10px rgba(255, 112, 141, 0.3);
}

.method-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.method-content.active {
    display: block;
}

.qr-placeholder {
    background: rgba(255, 255, 255, 0.3);
    border: 2px dashed #ff708d;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.qr-placeholder i {
    font-size: 4rem;
    color: rgba(255, 112, 141, 0.3);
    margin-bottom: 1rem;
}

.session-info {
    margin-top: 1.5rem !important;
    padding: 1.2rem !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border-radius: 15px !important;
    border: 2px solid #4CAF50 !important;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.result-data {
    text-align: left;
    flex: 1;
}

#session-id-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    font-weight: 800;
    color: #333;
    display: block;
    margin-top: 5px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    word-break: break-all;
    user-select: all;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-left: 15px;
}

.copy-btn, .wa-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.2s !important;
    color: white !important;
}

.copy-btn {
    background: #4CAF50 !important;
}

.wa-send-btn {
    background: #25D366 !important; /* WhatsApp Green */
}

.copy-btn:hover, .wa-send-btn:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.copy-btn:active, .wa-send-btn:active {
    transform: scale(0.95);
}

#actual-pairing-code {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}