:root {
    --bg-color: #f4f7f9;
    --card-color: #ffffff;
    --text-color: #2c3e50;
    --subtle-text-color: #7f8c8d;
    --primary-color: #3498db;
    --primary-hover-color: #4aa3df;
    --danger-color: #e74c3c;
    --danger-hover-color: #ec7063;
    --border-color: #e0e0e0;
    --font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 600px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-color);
}

#task-input-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    background-color: var(--card-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

#task-input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    background-color: #fdfdfd;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

#task-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

#task-display-area {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

#task-display-header {
    font-size: 1.1rem;
    color: var(--subtle-text-color);
    font-weight: 400;
}

#task-card {
    padding: 2.5rem 2rem;
    background-color: var(--card-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
}

#task-card p {
    font-size: 1.5rem;
    line-height: 1.6;
}

.action-buttons, .support-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover-color);
}

.btn-secondary {
    background-color: #bdc3c7;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #cacfd2;
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: var(--danger-hover-color);
}

footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

footer h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--subtle-text-color);
}

.btn-stripe {
    background-color: #6772e5;
}

.btn-stripe:hover {
    background-color: #7a84f0;
}

.btn-fanbox {
    background-color: #ff5b62;
}

.btn-fanbox:hover {
    background-color: #ff787f;
}

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

.modal-content {
    background-color: var(--card-color);
    margin: auto;
    padding: 2rem;
    border: none;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.modal-content p {
    color: var(--subtle-text-color);
    margin-bottom: 1rem;
    text-align: left;
}

#update-input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    background-color: #fdfdfd;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.hidden {
    display: none !important;
}

@media (max-width: 640px) {
    header h1 {
        font-size: 2rem;
    }

    #task-card p {
        font-size: 1.2rem;
    }

    .btn {
        width: 100%;
    }

    .action-buttons, .support-buttons {
        flex-direction: column;
    }

    .modal-actions {
        flex-direction: column;
    }
}
