@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.container {
    text-align: center;
    padding: 2rem;
    background-color: #3a3a3a;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    margin: 2rem;
}

h1 {
    color: #e0e0e0;
    margin-bottom: 2rem;
}

.section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.section h2 {
    color: #e0e0e0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #4a4a4a;
    padding-bottom: 0.5rem;
}

.section .description {
    text-align: left;
    background-color: transparent;
}

.section .description p {
    color: #b0b0b0;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.description {
    text-align: left;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #2a2a2a;
    border-radius: 5px;
}

.description p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #b0b0b0;
}

.description ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.description li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #b0b0b0;
}

.brick-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.brick {
    width: 100px;
    height: 100px;
    background-color: #4a4a4a;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.section .description ul {
    margin-bottom: 1.5rem;
}

.section .description li {
    color: #b0b0b0;
    margin-bottom: 0.5rem;
}

/* 步數記錄器專用樣式 */
.counter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.08);
    padding: 3rem 2.5rem;
    max-width: 380px;
    width: 100%;
    touch-action: manipulation;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.counter-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.counter-container h1 {
    color: #2d3748;
    margin-bottom: 2.5rem;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-align: center;
}

.counter-display {
    font-size: 5rem;
    font-weight: 700;
    color: #667eea;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    padding: 1.5rem 3rem;
    margin-bottom: 2.5rem;
    min-width: 160px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
    user-select: none;
    position: relative;
}

.counter-display::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    pointer-events: none;
}

.counter-display.animated {
    transform: scale(1.08);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.counter-display.animated::after {
    width: 100px;
    height: 100px;
    opacity: 0.6;
}

.counter-display.shake {
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.button-group {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.counter-btn {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 1.8rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: #fff;
    cursor: pointer;
    box-shadow: 
        0 8px 20px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
    user-select: none;
    position: relative;
    overflow: hidden;
    flex: 1;
    max-width: 90px;
}

.counter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.counter-btn:hover {
    background: linear-gradient(145deg, #7c93f0, #8a5caa);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 25px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.counter-btn:hover::before {
    left: 100%;
}

.counter-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 12px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.counter-btn#reset {
    background: linear-gradient(145deg, #ed8936, #e53e3e);
    box-shadow: 
        0 8px 20px rgba(237, 137, 54, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.counter-btn#reset:hover {
    background: linear-gradient(145deg, #f6ad55, #fc8181);
    box-shadow: 
        0 12px 25px rgba(237, 137, 54, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.auto-count-btn {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(145deg, #48bb78, #38a169);
    color: #fff;
    cursor: pointer;
    box-shadow: 
        0 8px 20px rgba(72, 187, 120, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
    user-select: none;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 200px;
}

.auto-count-btn:hover {
    background: linear-gradient(145deg, #68d391, #48bb78);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 25px rgba(72, 187, 120, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.auto-count-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 12px rgba(72, 187, 120, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@media (max-width: 500px) {
    body {
        padding: 0.5rem;
    }
    
    .counter-container {
        max-width: 100%;
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .counter-container h1 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .counter-display {
        font-size: 3.5rem;
        padding: 1rem 2rem;
        min-width: 140px;
    }
    
    .button-group {
        gap: 0.8rem;
    }
    
    .counter-btn {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
        max-width: 80px;
    }
}

@media (max-width: 350px) {
    .counter-display {
        font-size: 2.8rem;
        padding: 0.8rem 1.5rem;
    }
    
    .counter-btn {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
        max-width: 70px;
    }
} 