body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

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

h1, h2, h3, h4 {
    color: #333;
}

.form-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button {
    padding: 10px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #0069d9;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

button.danger {
    background-color: #dc3545;
}

button.danger:hover {
    background-color: #c82333;
}

button.secondary-btn {
    background-color: #6c757d;
    margin-top: 5px;
}

button.secondary-btn:hover {
    background-color: #5a6268;
}

.chat-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.messages {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
}

.user-message {
    background-color: #e6f7ff;
    text-align: right;
}

.assistant-message {
    background-color: #f0f0f0;
}

.system-message {
    background-color: #fff3cd;
    font-style: italic;
    border-left: 3px solid #ffeeba;
}

.listening-indicator {
    background-color: #e6f7ff;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    margin: 5px;
    animation: pulse 1.5s infinite;
    font-style: italic;
    color: #007bff;
}

.speech-error {
    background-color: #f8d7da;
    padding: 8px 15px;
    border-radius: 4px;
    font-style: italic;
    color: #721c24;
    margin-bottom: 10px;
}

.input-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.input-container input {
    flex: 1;
    min-width: 200px;
}

.mic-btn {
    background-color: #28a745;
    padding: 10px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-btn:hover {
    background-color: #218838;
}

.mic-btn.listening {
    background-color: #dc3545;
    animation: pulse 1.5s infinite;
}

.mic-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50%;
    position: relative;
}

.mic-icon:before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 7px;
    width: 4px;
    height: 10px;
    background-color: #fff;
    border-radius: 2px;
}

.recipe-display {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.recipe-details {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.recipe-detail {
    margin-right: 20px;
    margin-bottom: 10px;
}

.ingredients-list {
    margin-bottom: 20px;
}

.instructions-list li {
    margin-bottom: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.instructions-list li:hover {
    background-color: #f0f0f0;
}

.hidden {
    display: none;
}

.status-indicator {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
}

.status-indicator.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-indicator.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-indicator.loading {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.status-details {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-weight: normal;
}

.status-details h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.status-details ol, .status-details ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.status-details li {
    margin-bottom: 5px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.status-indicator.loading {
    animation: pulse 1.5s infinite;
}

.voice-selector {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.audio-player {
    background-color: #fff;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.audio-player h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.audio-player audio {
    width: 100%;
}

.recipes-browser {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.recipes-loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #6c757d;
}

.recipes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.recipe-card {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.recipe-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.recipe-card p {
    color: #6c757d;
    margin-bottom: 15px;
    max-height: 80px;
    overflow: hidden;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6c757d;
}

.recipe-meta span {
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 20px;
}

.select-recipe-btn {
    width: 100%;
    padding: 8px;
    font-size: 14px;
}

/* Voice speed control */
.voice-speed-control {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-speed-control label {
    margin-bottom: 0;
    margin-right: 10px;
    min-width: 100px;
}

.voice-speed-control input[type="range"] {
    flex: 1;
}

#voice-speed-value {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
}

/* Timer container styling */
.timer-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.timer-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

#active-timers {
    margin-bottom: 20px;
    min-height: 40px;
}

.timer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 10px;
}

.timer-label {
    font-weight: bold;
}

.timer-time {
    font-family: monospace;
    font-size: 18px;
    background-color: #e9ecef;
    padding: 5px 10px;
    border-radius: 4px;
}

.timer-time.expired {
    background-color: #f8d7da;
    color: #721c24;
}

.create-timer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.create-timer input {
    flex: 1;
    min-width: 60px;
}

.create-timer input[type="text"] {
    flex: 2;
    min-width: 100px;
}

/* iOS Timer Container */
.ios-timer-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    text-align: center;
}

.ios-timer-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #007bff;
}

.ios-timer-qr {
    margin: 15px auto;
    max-width: 200px;
}

.ios-timer-qr img {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.ios-timer-link {
    display: inline-block;
    margin: 10px 0;
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.ios-timer-link:hover {
    background-color: #0069d9;
    text-decoration: none;
    color: white;
}

.ios-setup-link {
    margin-top: 10px;
    font-size: 14px;
}

.ios-setup-link a {
    color: #6c757d;
    text-decoration: underline;
}

/* Resume container */
.resume-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.resume-container input {
    flex: 1;
}

/* Modal styling */
.modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

@media (max-width: 768px) {
    .input-container {
        flex-direction: column;
    }
    
    .input-container button {
        width: 100%;
    }
    
    .recipe-details {
        flex-direction: column;
    }
    
    .recipe-detail {
        margin-right: 0;
    }
    
    .voice-speed-control {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .voice-speed-control input[type="range"] {
        width: 100%;
    }
    
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
    
    .create-timer {
        flex-direction: column;
    }
}