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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #fafafa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.app-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.app-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
}

.main-content {
    padding: 20px;
}

.counter-section {
    text-align: center;
    margin-bottom: 30px;
}

.counter-display {
    margin-bottom: 20px;
}

.count-number {
    font-size: 72px;
    font-weight: 600;
    color: #667eea;
    line-height: 1;
    transition: all 0.3s ease;
}

.count-label {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

.add-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.add-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.add-button:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 20px;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.input-section {
    margin-bottom: 30px;
}

.input-section textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 100px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.input-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

.save-button {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-button:hover {
    background: #218838;
    transform: translateY(-1px);
}

.save-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.save-button:disabled:hover {
    background: #ccc;
    transform: none;
}

.history-section h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
}

.thoughts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thought-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    animation: slideIn 0.3s ease;
}

.thought-time {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.thought-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.thought-metrics {
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.metric {
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
}

.floating-animation {
    position: fixed;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s ease;
}

.floating-animation.show {
    opacity: 1;
    transform: scale(1);
}

.floating-animation.hide {
    opacity: 0;
    transform: scale(0) translateY(-50px);
}

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

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

.count-number.pulse {
    animation: pulse 0.3s ease;
}

.settings-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.settings-section h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
}

.clear-all-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.clear-all-button:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 300px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.modal-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 25px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.cancel-button,
.confirm-button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-button {
    background: #f8f9fa;
    color: #333;
}

.cancel-button:hover {
    background: #e9ecef;
}

.confirm-button {
    background: #dc3545;
    color: white;
}

.confirm-button:hover {
    background: #c82333;
}

.export-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.export-button:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
        box-shadow: none;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .count-number {
        font-size: 60px;
    }
    
    .stats-section {
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
}