/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #EDEEF7 0%, #E4FBFF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99997;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(120, 104, 230, 0.2);
    border: 1px solid rgba(120, 104, 230, 0.1);
    max-width: 300px;
    width: 90%;
}

.loading-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(120, 104, 230, 0.2);
    border-top: 4px solid #7868E6;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #7868E6;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

html {
  background-color: #333;
 
}

.container {
  max-width: 100%;
  overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #EDEEF7 0%, #E4FBFF 100%);
    min-height: 100vh;
    color: #333;
    position: relative;
    padding-top: var(--statusbar-height);
    padding-bottom: var(--actionbar-height);
}

/* Paper Texture Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(120, 104, 230, 0.05) 1px, transparent 0);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: -1;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(120, 104, 230, 0.15);
    border: 1px solid rgba(120, 104, 230, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(120, 104, 230, 0.2);
}

.header-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-title {
    font-size: 1.5rem;
    color: #7868E6;
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

.header-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
    z-index: 100000 !important;
    transition: all 0.3s ease;
    position: relative;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.hamburger {
    width: 100%;
    height: 3px;
    background: #7868E6;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active .hamburger:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
    background: #5a4bc7;
}

.menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
    background: #5a4bc7;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu - Separado do header */
.nav-menu-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 90%;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.25);
    z-index: 999999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: none;
}

.nav-menu-mobile.active {
    right: 0;
}

.nav-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(var(--statusbar-height) + 20px) 25px 20px 25px;
    background: linear-gradient(135deg, rgba(120, 104, 230, 0.05) 0%, rgba(184, 181, 255, 0.08) 100%);
    border-bottom: 1px solid rgba(120, 104, 230, 0.15);
}

.nav-menu-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(120, 104, 230, 0.2);
}

.nav-menu-title {
    flex: 1;
    margin: 0 15px;
    color: #7868E6;
    font-size: 1.3rem;
    font-weight: 700;
}

.menu-close {
    width: 42px;
    height: 42px;
    border: none;
    background: rgba(120, 104, 230, 0.1);
    color: #7868E6;
    font-size: 1.8rem;
    font-weight: 300;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.menu-close:hover {
    background: #7868E6;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.nav-menu-links {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-menu-links .nav-link {
    padding: 18px 24px;
    background: white;
    border: 2px solid rgba(120, 104, 230, 0.1);
    border-radius: 14px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    display: block;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.nav-menu-links .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #7868E6;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-menu-links .nav-link:hover::before,
.nav-menu-links .nav-link.active::before {
    transform: scaleY(1);
}

.nav-menu-links .nav-link:hover,
.nav-menu-links .nav-link.active {
    background: rgba(120, 104, 230, 0.05);
    border-color: #7868E6;
    color: #7868E6;
    padding-left: 28px;
}

.nav-menu-footer {
    padding: 25px;
    text-align: center;
    border-top: 1px solid rgba(120, 104, 230, 0.1);
    background: rgba(120, 104, 230, 0.03);
    margin-top: auto;
}

.nav-menu-footer p {
    color: #7868E6;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.nav-menu-footer small {
    color: #999;
    font-size: 0.85rem;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: #7868E6;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.nav-link:hover,
.nav-link.active {
    background: #7868E6;
    color: #1fa4b3;
    transform: translateY(-1px);
}

.nav-link:active {
    transform: translateY(0);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Section Styles */
section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(120, 104, 230, 0.1);
    border: 1px solid rgba(120, 104, 230, 0.1);
}

section h2 {
    color: #7868E6;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

/* Timer Section - Modern Design */
.timer-container {
    background: linear-gradient(135deg, rgba(120, 104, 230, 0.05) 0%, rgba(184, 181, 255, 0.1) 100%);
    border-radius: 20px;
    padding: 30px;
    border: 2px solid rgba(120, 104, 230, 0.15);
}

.timer-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.timer-icon {
    font-size: 2.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.timer-header h2 {
    margin: 0;
    color: #7868E6;
    font-size: 1.8rem;
}

/* Timer Circle with Progress */
.timer-display-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.timer-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.timer-progress {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-progress-bg {
    fill: none;
    stroke: rgba(184, 181, 255, 0.2);
    stroke-width: 8;
}

.timer-progress-bar {
    fill: none;
    stroke: url(#timerGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s linear;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: #7868E6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 0 2px 10px rgba(120, 104, 230, 0.3);
    letter-spacing: 2px;
}

/* Timer running state */
.timer-section.running .timer-circle {
    animation: glow 2s ease-in-out infinite;
}

.timer-section.running .timer-display {
    color: #5a4bc7;
    animation: pulse-text 1s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(120, 104, 230, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(120, 104, 230, 0.5));
    }
}

@keyframes pulse-text {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Timer Controls */
.timer-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timer-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timer-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #7868E6;
    text-align: center;
}

.timer-select {
    padding: 12px 20px;
    border: 2px solid #B8B5FF;
    border-radius: 12px;
    background: white;
    color: #7868E6;
    font-size: 1.05rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 8px rgba(120, 104, 230, 0.1);
    transition: all 0.3s ease;
}

.timer-select:hover {
    border-color: #7868E6;
    box-shadow: 0 4px 12px rgba(120, 104, 230, 0.2);
}

.timer-select:focus {
    outline: none;
    border-color: #7868E6;
    box-shadow: 0 0 0 3px rgba(120, 104, 230, 0.2);
}

/* Timer Buttons */
.timer-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.timer-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timer-btn .btn-icon {
    font-size: 1.2rem;
}

.timer-btn.primary {
    background: linear-gradient(135deg, #7868E6 0%, #6658d3 100%);
    color: white;
}

.timer-btn.primary:hover {
    background: linear-gradient(135deg, #6658d3 0%, #5a4bc7 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(120, 104, 230, 0.3);
}

.timer-btn.secondary {
    background: linear-gradient(135deg, #FFB4B4 0%, #ff9999 100%);
    color: white;
}

.timer-btn.secondary:hover {
    background: linear-gradient(135deg, #ff9999 0%, #ff7777 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 153, 153, 0.3);
}

.timer-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Sound Grid */
.sound-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sound-control {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.sound-control.active {
    border-color: #7868E6;
    box-shadow: 0 0 20px rgba(120, 104, 230, 0.3);
}

.sound-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sound-name {
    font-weight: 600;
    color: #7868E6;
    font-size: 1.1rem;
}

.sound-toggle {
    width: 50px;
    height: 25px;
    background: #ddd;
    border-radius: 25px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.sound-toggle.active {
    background: #7868E6;
}

.sound-toggle::after {
    content: '';
    position: absolute;
    width: 21px;
    height: 21px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.sound-toggle.active::after {
    transform: translateX(25px);
}

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

.volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #7868E6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-webkit-slider-thumb:active {
    transform: scale(1.3);
    background: #6658d3;
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #7868E6;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb:active {
    transform: scale(1.3);
    background: #6658d3;
}

.volume-value {
    min-width: 35px;
    text-align: center;
    font-weight: 500;
    color: #7868E6;
}

/* Master Controls */
.master-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(120, 104, 230, 0.1);
}

.master-volume {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 250px;
}

.master-volume label {
    font-weight: 600;
    color: #7868E6;
    min-width: 100px;
}

.volume-slider.master {
    background: linear-gradient(to right, #B8B5FF, #7868E6);
}

.playback-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.control-btn.play {
    background: #7868E6;
    color: white;
}

.control-btn.stop {
    background: #FFB4B4;
    color: white;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Presets Section */
.preset-controls {
    margin-bottom: 20px;
}

.save-preset {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.preset-input {
    padding: 12px 15px;
    border: 2px solid #B8B5FF;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.9);
}

.preset-input:focus {
    outline: none;
    border-color: #7868E6;
    box-shadow: 0 0 10px rgba(120, 104, 230, 0.3);
}

.preset-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 44px;
}

.preset-btn.save {
    background: #7868E6;
    color: white;
}

.preset-btn.load {
    background: #B8B5FF;
    color: #7868E6;
}

.preset-btn.delete {
    background: #FFB4B4;
    color: white;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.preset-btn:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.presets-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 15px;
}

.preset-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(120, 104, 230, 0.2);
    transition: all 0.3s ease;
}

.preset-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(120, 104, 230, 0.2);
}

.preset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.preset-name {
    font-weight: 600;
    color: #7868E6;
    font-size: 1.1rem;
}

.preset-date {
    font-size: 0.8rem;
    color: #666;
}

.preset-sounds {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.preset-actions {
    display: flex;
    gap: 8px;
}

/* Status Messages */
.status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 8000;
    transition: all 0.3s ease;
    max-width: 300px;
}

.status-message.success {
    background: #4CAF50;
}

.status-message.error {
    background: #f44336;
}

.status-message.info {
    background: #2196F3;
}

.status-message.hidden {
    opacity: 0;
    transform: translateX(100%);
}

/* Footer - Modern Design */
.footer {
    margin-top: 50px;
    background: linear-gradient(135deg, rgba(120, 104, 230, 0.08) 0%, rgba(184, 181, 255, 0.12) 100%);
    border-radius: 20px 20px 0 0;
    padding: 40px 30px 70px 30px;
    border-top: 3px solid rgba(120, 104, 230, 0.2);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 30px;
    align-items: start;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(120, 104, 230, 0.25);
}

.footer-brand-text h3 {
    margin: 0 0 5px 0;
    color: #7868E6;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.footer-brand-text p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-section h4 {
    margin: 0 0 8px 0;
    color: #7868E6;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 4px 0;
    position: relative;
}

.footer-section a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 0;
    height: 2px;
    background: #7868E6;
    transition: width 0.3s ease;
}

.footer-section a:hover {
    color: #7868E6;
    padding-left: 8px;
}

.footer-section a:hover::before {
    width: 20px;
}

.footer-bottom {
    padding-top: 25px;
    border-top: 1px solid rgba(120, 104, 230, 0.15);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-bottom p {
    margin: 0;
    color: #888;
    font-size: 0.85rem;
}

.footer-bottom strong {
    color: #7868E6;
    font-weight: 600;
}

.footer-bottom a {
    color: #7868E6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-bottom a:hover {
    text-decoration: underline;
    color: #5a4bc7;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(120, 104, 230, 0.3);
    border-radius: 50%;
    border-top-color: #7868E6;
    animation: spin 1s ease-in-out infinite;
}

/* Ad Countdown Overlay - Simplificado */
#adCountdownOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.countdown-content {
    text-align: center;
    padding: 50px;
}

.countdown-number {
    font-size: 8rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 4px 30px rgba(120, 104, 230, 0.8);
    margin-bottom: 20px;
    animation: countdown-pulse 1s ease-in-out infinite;
}

.countdown-number.pulse-final {
    animation: countdown-final 0.5s ease-in-out infinite;
    color: #7868E6;
}

.countdown-content p {
    color: #ffffff;
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 500;
}

@keyframes countdown-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes countdown-final {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Countdown Responsive */
@media (max-width: 480px) {
    .countdown-content {
        padding: 40px 30px;
    }

    .countdown-number {
        font-size: 6rem;
    }

    .countdown-content p {
        font-size: 1rem;
    }
}

/* Responsive Design */

/* Desktop - Menu Normal (sem hamburguer) */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }

    .menu-overlay {
        display: none !important;
    }

    .nav-menu-mobile {
        display: none !important;
    }

    .nav-menu {
        position: static !important;
        display: flex !important;
        flex-direction: row !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        padding: 0 !important;
        right: auto !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .nav-link {
        opacity: 1 !important;
        transform: none !important;
        width: auto !important;
        background: transparent !important;
    }
}

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    .app-container {
        padding: 18px;
    }

    .sound-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
        gap: 18px;
    }

    section {
        padding: 22px;
    }

    .timer-circle {
        width: 180px;
        height: 180px;
    }

    .timer-display {
        font-size: 2.5rem;
    }

    .timer-icon {
        font-size: 2rem;
    }

    .timer-header h2 {
        font-size: 1.6rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 35px;
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
    }

    .footer-sections {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Portrait and Mobile (768px and below) */
@media (max-width: 768px) {
    .app-container {
        padding: 15px;
    }

    .header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
    }

    .header-brand {
        flex: 1;
    }

    .header-logo {
        width: 50px;
        height: 50px;
    }

    .header-title {
        font-size: 1.2rem;
    }

    .header-subtitle {
        font-size: 0.75rem;
    }

    /* Mostrar botão hamburguer em mobile */
    .menu-toggle {
        display: flex !important;
    }

    /* Esconder menu desktop, mostrar mobile */
    .nav-menu {
        display: none !important;
    }

    .nav-menu-mobile {
        display: block !important;
    }

    section {
        padding: 20px;
    }

    section h2 {
        font-size: 1.3rem;
    }

    .loading-content {
        padding: 30px 20px;
        max-width: 280px;
    }

    .loading-logo {
        width: 70px;
        height: 70px;
    }

    .loading-spinner {
        width: 35px;
        height: 35px;
    }

    .loading-text {
        font-size: 1rem;
    }
    
    .sound-grid {
        grid-template-columns: 1fr;
    }
    
    .master-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .master-volume {
        min-width: auto;
    }
    
    .timer-container {
        padding: 25px 20px;
    }

    .timer-circle {
        width: 160px;
        height: 160px;
    }
    
    .timer-display {
        font-size: 2rem;
    }

    .timer-header h2 {
        font-size: 1.4rem;
    }

    .timer-icon {
        font-size: 1.8rem;
    }

    .timer-buttons {
        flex-direction: column;
    }

    .timer-btn {
        width: 100%;
    }

    .control-btn, .preset-btn {
        padding: 10px 16px;
        font-size: 0.95rem;
    }

    .playback-controls {
        flex-direction: column;
        width: 100%;
    }

    .playback-controls .control-btn {
        width: 100%;
    }
    
    .save-preset {
        flex-direction: column;
    }
    
    .preset-input {
        max-width: none;
        width: 100%;
    }
    
    .presets-list {
        grid-template-columns: 1fr;
    }
    
    .preset-actions {
        flex-direction: column;
    }

    .preset-actions .preset-btn {
        width: 100%;
    }
    
    .status-message {
        position: fixed;
        top: auto;
        bottom: calc(var(--actionbar-height) + 10px);
        left: 10px;
        right: 10px;
        margin: 0;
        max-width: none;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .app-container {
        padding: 12px;
    }

    .header {
        padding: 15px;
    }

    .app-title {
        font-size: 1.4rem;
        flex-direction: column;
        gap: 8px;
    }

    .title-icon img {
        width: 60px;
        height: 60px;
    }

    section {
        padding: 18px;
    }

    section h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .loading-content {
        padding: 25px 15px;
        max-width: 250px;
    }

    .loading-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .loading-spinner {
        width: 30px;
        height: 30px;
        margin-bottom: 15px;
    }

    .loading-text {
        font-size: 0.9rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 8px;
    }

    .nav-link {
        padding: 10px 15px;
        text-align: center;
    }

    .timer-container {
        padding: 20px 15px;
    }

    .timer-circle {
        width: 140px;
        height: 140px;
    }
    
    .timer-display {
        font-size: 1.8rem;
    }

    .timer-header h2 {
        font-size: 1.3rem;
    }

    .timer-icon {
        font-size: 1.6rem;
    }

    .timer-select {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .timer-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-height: 48px;
    }

    .timer-btn .btn-text {
        font-size: 0.85rem;
    }
    
    .sound-control {
        padding: 15px;
    }

    .sound-name {
        font-size: 1rem;
    }

    .sound-toggle {
        width: 54px;
        height: 28px;
    }

    .sound-toggle::after {
        width: 24px;
        height: 24px;
    }

    .sound-toggle.active::after {
        transform: translateX(26px);
    }

    .control-btn {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .master-volume label {
        font-size: 0.95rem;
        min-width: auto;
    }

    .volume-slider {
        height: 8px;
    }

    .volume-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }

    .volume-slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
    
    .preset-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .preset-name {
        font-size: 1rem;
    }

    .preset-sounds {
        font-size: 0.85rem;
    }

    .preset-btn {
        padding: 10px;
        font-size: 0.9rem;
    }

    .footer {
        padding: 30px 20px 70px 20px;
        margin-top: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-brand {
        justify-content: center;
        text-align: center;
        flex-direction: column;
    }

    .footer-sections {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .footer-section a::before {
        display: none;
    }

    .footer-section a:hover {
        padding-left: 0;
    }
}

/* Extra Small Mobile (320px and below) */
@media (max-width: 360px) {
    .app-container {
        padding: 10px;
    }

    .header {
        padding: 12px;
        margin-bottom: 20px;
    }

    .app-title {
        font-size: 1.2rem;
    }

    .title-icon img {
        width: 50px;
        height: 50px;
    }

    section {
        padding: 15px;
        margin-bottom: 15px;
    }

    section h2 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .main-content {
        gap: 20px;
    }

    .timer-container {
        padding: 18px 12px;
    }

    .timer-circle {
        width: 120px;
        height: 120px;
    }

    .timer-display {
        font-size: 1.5rem;
    }

    .timer-header h2 {
        font-size: 1.1rem;
    }

    .timer-icon {
        font-size: 1.4rem;
    }

    .timer-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .sound-grid {
        gap: 12px;
        margin-bottom: 20px;
    }

    .sound-control {
        padding: 12px;
    }

    .sound-name {
        font-size: 0.95rem;
    }

    .volume-value {
        font-size: 0.85rem;
        min-width: 32px;
    }

    .timer-btn, .control-btn, .preset-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .master-controls {
        gap: 15px;
    }

    .presets-list {
        gap: 12px;
    }

    .preset-item {
        padding: 12px;
    }

    .footer {
        padding: 25px 15px 70px 15px;
        margin-top: 25px;
    }

    .footer-logo {
        width: 50px;
        height: 50px;
    }

    .footer-brand-text h3 {
        font-size: 1rem;
    }

    .footer-brand-text p {
        font-size: 0.85rem;
    }

    .footer-section h4 {
        font-size: 0.85rem;
    }

    .footer-section a {
        font-size: 0.85rem;
    }
}

/* Legal Pages Styles */
.legal-section {
    max-width: 900px;
    margin: 0 auto;
}

.legal-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(120, 104, 230, 0.1);
}

.legal-intro {
    background: rgba(120, 104, 230, 0.05);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #7868E6;
}

.legal-intro p {
    margin-bottom: 12px;
    line-height: 1.8;
    color: #333;
}

.legal-intro strong {
    color: #7868E6;
}

.legal-section-content {
    margin-bottom: 35px;
}

.legal-section-content h2 {
    color: #7868E6;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(120, 104, 230, 0.2);
}

.legal-section-content h3 {
    color: #5a4bc7;
    font-size: 1.3rem;
    margin: 20px 0 15px 0;
}

.legal-section-content p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #444;
}

.legal-section-content ul,
.legal-section-content ol {
    margin: 15px 0 15px 25px;
    line-height: 1.8;
}

.legal-section-content li {
    margin-bottom: 10px;
    color: #444;
}

.legal-section-content a {
    color: #7868E6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.legal-section-content a:hover {
    text-decoration: underline;
    color: #5a4bc7;
}

.contact-box {
    background: rgba(184, 181, 255, 0.1);
    border: 2px solid rgba(120, 104, 230, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.contact-box.highlight {
    background: linear-gradient(135deg, rgba(120, 104, 230, 0.1) 0%, rgba(184, 181, 255, 0.15) 100%);
    border: 2px solid #7868E6;
}

.contact-box h3 {
    color: #7868E6;
    margin-top: 0;
    margin-bottom: 15px;
}

.contact-box p {
    margin-bottom: 8px;
}

.contact-box a {
    color: #7868E6;
    font-weight: 600;
}

.warning-box {
    background: rgba(255, 180, 180, 0.15);
    border: 2px solid #ff9999;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.warning-box p {
    margin-bottom: 10px;
    color: #c62828;
}

.warning-box strong {
    color: #b71c1c;
}

.legal-footer {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid rgba(120, 104, 230, 0.2);
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.legal-footer em {
    display: block;
    margin-bottom: 15px;
    line-height: 1.6;
}

.legal-footer p {
    margin: 5px 0;
}

/* Legal Pages Responsive */
@media (max-width: 768px) {
    .legal-container {
        padding: 25px 20px;
    }

    .legal-section-content h2 {
        font-size: 1.5rem;
    }

    .legal-section-content h3 {
        font-size: 1.2rem;
    }

    .legal-intro {
        padding: 20px;
    }

    .contact-box {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .legal-container {
        padding: 20px 15px;
    }

    .legal-section-content h2 {
        font-size: 1.3rem;
    }

    .legal-section-content h3 {
        font-size: 1.1rem;
    }

    .legal-section-content ul,
    .legal-section-content ol {
        margin-left: 20px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .sound-control {
        border: 3px solid #7868E6;
    }
    
    .timer-display {
        border: 2px solid #7868E6;
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus {
    outline: 3px solid #7868E6;
    outline-offset: 2px;
}

.sound-toggle:focus {
    box-shadow: 0 0 0 3px rgba(120, 104, 230, 0.5);
}
