/* CSS Variables for common properties */
:root {
    --background-color: #0d0f1b;
    --modal-background-color: #202b23;
    --primary-color: #ffffff;
    --secondary-color: #ffffff;
    --highlight-color: #29D35C;
    --font-serif: 'Source Serif Pro', 'Merriweather', serif;
    --font-sans: 'Source Sans 3', 'Roboto', sans-serif;
    --border-radius: 999px;
    --modal-background: rgba(13, 15, 27, 0.2);
    --row-border: rgba(255, 255, 255, 0.1);
}

/* General styles for the body */
body {
    font-family: var(--font-sans);
    color: var(--primary-color);
    font-size: 30px;
    margin: 0;
    padding: 8px;
    background-color: var(--background-color);
    height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden; /* Prevent scrolling when modal is open */
}

/* Platform-specific padding */
body.platform-ios .modal-footer, body.platform-ios .button-wrapper {
    padding-bottom: 34px; /* Increased bottom padding for safe area on iPhones */
}

body.platform-android .modal-footer, body.platform-android .button-wrapper {
    padding-bottom: 10px; /* Regular bottom padding for Android and Desktop */
}

body.platform-web .modal-footer, body.platform-web .button-wrapper {
    padding-bottom: 10px; /* Regular bottom padding for Web */
}

/* Main container holding all elements */
#home-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100svh;
    position: relative;
}

/* Top section styling */
.top-section {
    height: 80px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    text-align: center;
    z-index: 1; /* Ensures top part stays above the blob */
    margin-top: 0px !important; /* Override default margin */
}

/* Blob wrapper styling */
.blob-wrapper {
    width: 100%;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    position: relative;
    max-height: 100px;
}

/* Blob styling */
.blob {
    z-index: 0; /* Ensures blob stays behind other elements */
    font-weight: 700;

    background: var(--highlight-color); 
    /* background: -moz-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); 
    background: -webkit-linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); 
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);  */

    background-size: 500% 500%;
    -webkit-animation: GradientAnimation 12s ease infinite;
    -moz-animation: GradientAnimation 12s ease infinite;
    animation: GradientAnimation 12s ease infinite;
}

@-webkit-keyframes GradientAnimation {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 50%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 50%; }
    100% { background-position: 0% 50%; }
}

@-moz-keyframes GradientAnimation {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 50%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes GradientAnimation {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 50%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 50%; }
    100% { background-position: 0% 50%; }
}

#blob {
    border-radius: 50%;
    padding: 0px;
}

.blob-phase {
    font-size: 20px;
    text-align: center;
    text-transform: uppercase;
    width: 100%;
}

/* Bottom section styling */
.bottom-section {
    height: 330px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    z-index: 1; /* Ensures bottom part stays above the blob */
    gap: 10px; /* Ensures uniform spacing between elements */
    margin-bottom: 0px !important; /* Override default margin */
}

/* Timer display, button wrapper, and info wrapper styling */
.timer-display, .button-wrapper, .info-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px; /* Ensure uniform spacing */
}

.buttons-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
}

#share-button {
    width: 60px;
}

.timer-box {
    cursor: default;
}

.info-wrapper {
    gap: 10px; /* Ensures uniform spacing between elements */
    max-width: 95%;
}

/* Ensures uniform spacing and alignment within the home container */
#home-container > * {
    margin-top: auto;
    margin-bottom: auto;
}

/* Heading styles */
h1, h2, h3 {
    font-family: var(--font-serif);
    color: var(--primary-color);
    margin: 0px;
}

h1 {
    font-size: 35px;
    line-height: 34px;
}

h2 {
    font-size: 27px;
}

h3 {
    font-size: 170px;
}

p {
    margin: 0px;
}

/* Secondary small text style */
.text-secondary-small {
    font-family: var(--font-serif);
    /* font-style: italic; */
    font-size: 19px;
    color: var(--secondary-color);
}

/* Secondary normal text style */
.text-secondary-normal {
    font-family: var(--font-serif);
    color: var(--secondary-color);
    font-size: 27px;
}

/* Subheading small text style */
.text-subheading-small {
    font-family: var(--font-sans);
    color: var(--secondary-color);
    font-size: 19px;
}

/* Button styles */
.button {
    font-family: var(--font-sans);
    font-size: 19px;
    font-weight: 700;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius);
    padding: 16px 20px;
    box-sizing: border-box;
    text-align: center;
    cursor: pointer;
}

/* Primary button style */
.button.primary {
    color: var(--background-color);
    background-color: var(--primary-color);
}

/* Secondary button style */
.button.secondary {
    color: var(--primary-color);
    background-color: transparent;
}

/* Modal background styling */
.modal-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-background);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1000;
}

/* Modal styling */
.modal {
    width: 100%;
    max-height: 100%;
    background-color: var(--modal-background-color);
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1001;
}

/* Modal header styling */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.modal-header h2 {
    flex-grow: 1;
}

.close-button {
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--primary-color); /* White color for icons */
}

/* Modal content styling */
.modal-content {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
    -ms-overflow-style: none;  /* IE and Edge specific property */
    scrollbar-width: none; /* Firefox specific property */
}

.modal-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera specific property */
}

/* Row styling */
.row {
    border-top: 1px solid var(--row-border);
    padding-top: 10px;
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

/* Setting item styling */
.setting-item {
    flex-grow: 1;
}

/* Edit button styling */
.edit-button {
    height: 28px;
    width: 28px;
    color: var(--primary-color); /* White color for text */
    text-align: center;
    cursor: pointer;
}

/* Modal footer styling */
.modal-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.hidden {
    display: none;
}

/* Centered content */
.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Stepper button styling */
.stepper-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    color: var(--primary-color); /* White color for text */
    cursor: pointer;
    font-size: 30px;
}

.row.stepper {
    height: 200px;
    cursor: default;
}

/* Pattern styling */
.pattern {
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--secondary-color);
    cursor: pointer;
}

/* Selected pattern styling */
.selected {
    border: none;
    background-color: var(--primary-color);
}

.selected h2 {
    color: var(--background-color);
}

.selected .text-subheading-small {
    color: var(--background-color);
}

.transparent {
    opacity: 0;
}

a {
    font-size: 14px;
    color: #fff;
    font-family: var(--font-serif);
    text-decoration: none;
}