:root {
    --background: #111827;
    --navbar: #1f2937;
    --card: #1f2937;
    --text: #ffffff;
    --secondary-text: #9ca3af;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --input: #374151;
    --border: #4b5563;
}

/* Hide scrollbars */
::-webkit-scrollbar {
   display: none;
}

html,
body {
   scrollbar-width: none; /* Firefox */
   -ms-overflow-style: none; /* IE/Edge */
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}
.navbar {
    background-color: var(--navbar);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 0.5s ease-out;
    will-change: opacity;
}
.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    animation: fadeIn 0.8s ease-out;
    will-change: opacity;
}
.nav-links {
    display: flex;
    gap: 24px;
    animation: slideInRight 0.5s ease-out;
    will-change: transform, opacity;
}
.nav-link {
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}
.nav-link:hover {
    color: white;
}
.nav-link:nth-child(1) { animation-delay: 0.2s; }
.nav-link:nth-child(2) { animation-delay: 0.3s; }
.nav-link:nth-child(3) { animation-delay: 0.4s; }
.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    animation: slideUp 0.8s ease-out;
    will-change: transform, opacity;
}
.settings-section {
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    animation: slideUp 0.8s ease-out;
    animation-fill-mode: both;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.settings-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.settings-section:nth-child(1) { animation-delay: 0.1s; }
.settings-section:nth-child(2) { animation-delay: 0.2s; }
.settings-section:nth-child(3) { animation-delay: 0.3s; }
.settings-section:nth-child(4) { animation-delay: 0.4s; }
.settings-section:nth-child(5) { animation-delay: 0.5s; }
h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
}
.setting-group {
    margin-bottom: 24px;
}
.setting-group:last-child {
    margin-bottom: 0;
}
label {
    display: block;
    margin-bottom: 8px;
    color: #9ca3af;
}
select, input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    background: var(--input);
    border: 2px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 16px;
    animation: fadeIn 0.5s ease-out;
    transition: all 0.3s ease;
}
select:focus, input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    transform: translateY(-1px);
    animation: glowPulse 2s infinite;
}
.cloak-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #374151;
    border-radius: 6px;
    margin-top: 16px;
}
.cloak-preview img {
    width: 16px;
    height: 16px;
}
button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    animation: scaleIn 0.5s ease-out;
    transition: all 0.3s ease;
}
button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    animation: glowPulse 2s infinite;
}
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    animation: scaleIn 0.5s ease-out;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #374151;
    transition: .4s;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

input:checked + .slider {
    background-color: #3b82f6;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    animation: slideInRight 0.5s ease-out;
}

.setting-description {
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-bottom: 16px;
    animation: fadeIn 0.8s ease-out;
}

.input-group {
    margin-bottom: 16px;
}

.button-group {
    display: flex;
    gap: 10px;
}

.secondary-button {
    background: var(--input);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.secondary-button:hover {
    background: var(--border);
}

/* Particle options styling */
.particles-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    animation: fadeIn 0.8s ease-out;
}

.particle-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.particle-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.particle-option label:first-child {
    font-weight: 500;
    color: var(--text);
}

.setting-note {
    font-size: 0.85rem;
    color: var(--secondary-text);
    font-style: italic;
    margin-top: 5px;
    opacity: 0.8;
}

/* Style for iframe overlays */
iframe[id$="-overlay"] {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    z-index: -1;
}

/* Add styles for the overlay iframe */
#rain-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999;
pointer-events: none; /* Makes the iframe click-throughable */
border: none;
}

/* Add styles for the toggle switch */
.Rain {
position: relative;
display: inline-block;
width: 120px;
height: 34px;
background-color: #ccc;
border-radius: 34px;
transition: background-color 0.4s;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
font-family: 'Inter', sans-serif;
font-size: 12px;
color: white;
text-align: center;
line-height: 34px;
cursor: pointer;
user-select: none;
}

.Rain input {
opacity: 0;
width: 0;
height: 0;
}

.switch {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: 0.4s;
border-radius: 34px;
}

.switch:before {
position: absolute;
content: "Rain: Off";
height: 26px;
width: 60px;
left: 4px;
bottom: 4px;
background-color: white;
color: black;
text-align: center;
line-height: 26px;
font-size: 12px;
font-weight: bold;
transition: 0.4s;
border-radius: 34px;
}

input:checked + .switch {
background-color: #ff4757;
}

input:checked + .switch:before {
transform: translateX(56px);
content: "Rain: On";
color: rgb(0, 0, 0);
}

/* Add animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.8); }
    100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
}
/* Navigation bar styles */
.navbar {
   background-color: #1f2937;
   padding: 16px 24px;
   display: flex;
   align-items: center;
   justify-content: space-between;
}

.nav-logo {
   font-size: 1.5rem;
   font-weight: bold;
   color: white;
   text-decoration: none;
}

.nav-links {
   display: flex;
   gap: 24px;
   align-items: center;
}

.nav-link {
   color: #9ca3af;
   text-decoration: none;
   font-size: 0.9rem;
   transition: color 0.2s;
}

.nav-link:hover {
   color: white;
}
/* Apply animations to elements */
.navbar {
    animation: fadeIn 0.5s ease-out;
    will-change: opacity;
}

.nav-logo {
    animation: fadeIn 0.8s ease-out;
    will-change: opacity;
}

.nav-links {
    animation: slideInRight 0.5s ease-out;
    will-change: transform, opacity;
}

/* Apply animations to elements */
.navbar {
    animation: fadeIn 0.5s ease-out;
    will-change: opacity;
}

.nav-logo {
    animation: fadeIn 0.8s ease-out;
    will-change: opacity;
}

.nav-links {
    animation: slideInRight 0.5s ease-out;
    will-change: transform, opacity;
}


.nav-link {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.nav-link:nth-child(1) { animation-delay: 0.2s; }
.nav-link:nth-child(2) { animation-delay: 0.3s; }
.nav-link:nth-child(3) { animation-delay: 0.4s; }
