* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    /* Modern Gradient Background */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.main-container {
    background-color: #ffffff;
    width: 100%;
    max-width: 800px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

h1 {
    text-align: center;
    color: #333;
    margin-top: 0;
    font-weight: 600;
}

#status {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
    height: 20px;
}

.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap; 
    margin-bottom: 25px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#start-btn {
    background-color: #4CAF50; /* Green */
    color: white;
}

#stop-btn {
    background-color: #e53935; /* Red */
    color: white;
}

#save-btn {
    background-color: #2196F3; /* Blue */
    color: white;
}

#deleteAll-btn {
    background-color: #f1f1f1;
    color: #333;
}

#deleteAll-btn:hover {
    background-color: #e0e0e0;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s;
    background-color: #fafafa;
}

textarea:focus {
    border-color: #764ba2; 
    background-color: #fff;
}

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

.notes-section h2 {
    color: #444;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.note {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    color: #555;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
    position: relative;
}

.note:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #d1d1d1;
}

.note span {
    margin-bottom: 10px;
    line-height: 1.5;
}

.delete-btn {
    background: #ffebee;
    color: #c62828;
    align-self: flex-end; 
    padding: 5px 10px;
    font-size: 12px;
    margin-top: 10px;
}

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

@media (max-width: 600px) {
    .main-container {
        padding: 20px;
    }
    
    .controls {
        flex-direction: column;
        width: 100%;
    }

    button {
        width: 100%;
        justify-content: center;
    }
}