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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 30px;
    color: #000;
}

h2 {
    font-size: 22px;
    font-weight: 300;
    margin-bottom: 20px;
    color: #000;
}

h3 {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 15px;
    margin-top: 30px;
    color: #666;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Add Project */
.add-project {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.add-project input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    outline: none;
}

.add-project input:focus {
    border-color: #999;
}

.add-project button {
    padding: 12px 24px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.add-project button:hover {
    background: #333;
}

/* Project List */
#projectList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.project-item:hover {
    background: #fafafa;
}

.project-name {
    font-size: 16px;
    font-weight: 400;
}

.project-time {
    font-size: 14px;
    color: #666;
}

.delete-btn {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.delete-btn:hover {
    background: #f5f5f5;
}

/* Back Button */
.back-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: #f5f5f5;
}

/* Project Header */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-buttons {
    display: flex;
    gap: 8px;
}

.toggle-timer-btn {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.toggle-timer-btn:hover {
    background: #f5f5f5;
}

.rename-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 13px;
}

.rename-btn:hover {
    background: #f5f5f5;
}

/* Timer Display */
.timer-display {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    transition: opacity 0.3s, max-height 0.3s;
    max-height: 200px;
    overflow: hidden;
}

.timer-display.hidden {
    opacity: 0;
    max-height: 0;
    margin: 0;
}

.total-time, .current-time {
    flex: 1;
    text-align: center;
}

.total-time span, .current-time span {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.total-time div, .current-time div {
    font-size: 28px;
    font-weight: 300;
    color: #000;
}

/* Controls */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.controls button {
    flex: 1;
    padding: 15px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.btn-start {
    background: #c41e3a;
    color: #fff;
}

.btn-start:hover:not(:disabled) {
    background: #a01828;
}

.btn-pause {
    background: #f5f5f5;
    color: #333;
}

.btn-pause:hover:not(:disabled) {
    background: #e0e0e0;
}

.btn-stop {
    background: #f5f5f5;
    color: #333;
}

.btn-stop:hover:not(:disabled) {
    background: #e0e0e0;
}

.controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Sessions */
.sessions {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

#sessionList {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fafafa;
    font-size: 14px;
    color: #666;
}

.session-delete-btn {
    padding: 4px 10px;
    background: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 11px;
    color: #666;
}

.session-delete-btn:hover {
    background: #e0e0e0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 2px;
    min-width: 300px;
    max-width: 90%;
    animation: slideIn 0.2s;
}

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

.modal-content h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 400;
    color: #000;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    margin-bottom: 20px;
    outline: none;
}

.modal-content input:focus {
    border-color: #999;
}

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

.btn-cancel, .btn-confirm {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-cancel {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.btn-cancel:hover {
    background: #f5f5f5;
}

.btn-confirm {
    background: #000;
    color: #fff;
}

.btn-confirm:hover {
    background: #333;
}