:root {
    --black: #000000;
    --dark-gray: #000000;
    --gray: #1b1b1d;
    --light-gray: #1a1a1b;
    --white: #dbdbe2;
    --off-white: #a8a8b4;
    --accent: #cccce0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background-color: var(--black);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    background-color: var(--dark-gray);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

/* Profile section */
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0 32px;
}

.avatar {
    width: 100px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.name {
    font-size: 39px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--white);
    margin-bottom: 6px;
}

.handle {
    font-size: 17px;
    color: var(--accent);
    font-weight: 400;
}

/* Header section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #8e8e93, #aeaeb2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
}

/* Settings menu button */
.menu-button {
    background-color: var(--gray);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-button:hover {
    background-color: var(--light-gray);
    transform: scale(1.05);
}

.menu-button.active {
    background-color: var(--light-gray);
}

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: var(--dark-gray);
    border-radius: 14px;
    padding: 12px 0;
    width: 280px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: var(--gray);
}

.menu-item i {
    width: 20px;
    color: var(--accent);
}

.menu-divider {
    height: 1px;
    background-color: var(--gray);
    margin: 8px 0;
}

/* Timer section */
.timer-section {
    text-align: center;
    margin-bottom: 40px;
}

.timer-status {
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 600;
}

.timer-display {
    font-size: 80px;
    font-weight: 700;
    letter-spacing: -2px;
    margin: 20px 0;
    transition: all 0.3s;
}

/* Control buttons */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.control-btn {
    background-color: var(--gray);
    border: none;
    color: var(--white);
    padding: 16px 28px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.control-btn:hover {
    background-color: var(--light-gray);
    transform: scale(1.05);
}

.control-btn.start {
    background-color: var(--white);
    color: var(--black);
}

.control-btn.start:hover {
    background-color: #f0f0f0;
}

.control-btn.reset {
    background-color: transparent;
    border: 2px solid var(--white);
}

.control-btn.reset:hover {
    background-color: #f0f0f0;
    color: var(--black);
}

/* Statistics section */
.stats-section {
    background-color: var(--gray);
    border-radius: 16px;
    padding: 20px;
    margin-top: 30px;
}

.stats-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-card {
    background-color: var(--light-gray);
    border-radius: 12px;
    padding: 16px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--accent);
}

.backup-link {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent);
    padding-bottom: 1px;
    cursor: pointer;
    transition: color 0.2s;
}

.backup-link:hover {
    color: var(--white);
}

/* Settings form */
.settings-form {
    padding: 10px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 14px;
}

.form-input {
    width: 100%;
    background-color: var(--gray);
    border: none;
    border-radius: 10px;
    padding: 14px;
    color: var(--white);
    font-size: 16px;
}

.form-input:focus {
    outline: none;
    background-color: var(--light-gray);
}

/* File input area */
.file-input-container {
    margin-top: 20px;
    padding: 15px;
    border: 2px dashed var(--gray);
    border-radius: 12px;
    text-align: center;
}

.file-input-label {
    display: block;
    cursor: pointer;
    color: var(--accent);
}

#backupFile {
    display: none;
}

/* iOS style toggle */
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 30px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--light-gray);
    border-radius: 34px;
    transition: 0.4s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: rgb(142, 111, 111);
    border-radius: 50%;
    transition: 0.4s;
}

input:checked+.toggle-slider {
    background-color: var(--white);
}

input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

/* Social links section */
.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 32px 0 24px;
}

.social-link {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 28px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.social-link:hover {
    background: var(--light-gray);
    transform: scale(1.05);
}

.social-link:active {
    background: var(--accent);
    transform: scale(0.98);
}

/* Responsive design */
@media (max-width: 768px) {
    .timer-display {
        font-size: 70px;
    }

    .controls {
        flex-direction: column;
        align-items: center;
    }

    .control-btn {
        width: 100%;
        max-width: 300px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dropdown-menu {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .timer-display {
        font-size: 60px;
    }

    .container {
        padding: 20px 16px;
    }

    .dropdown-menu {
        width: 220px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

/* Progress ring */
.progress-ring {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.progress-ring-circle {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-ring-bg {
    fill: none;
    stroke: var(--light-gray);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.timer-inside {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

@media (max-width: 768px) {
    .progress-ring {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .progress-ring {
        width: 220px;
        height: 220px;
    }
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--dark-gray);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#pointer {
    position: fixed;
    top: 0;
    left: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    mix-blend-mode: exclusion;
    pointer-events: none;
    z-index: 10000;
    transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease, transform 0.242s ease-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

img {
    pointer-events: none;
}

.unselectable {
    -webkit-user-select: none;
    /* Chrome, Safari, Opera */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* Standard */
}

@media (max-width: 768px) {

    #pointer,
    #cursor {
        display: none !important;
    }
}