:root {
    --primary-color: #ff4757;
    --primary-hover: #ff6b81;
    --bg-color: #2f3542;
    --text-light: #f1f2f6;
    --text-dark: #2f3542;
    --card-bg: #ffffff;
    --border-radius: 16px;
    --success-color: #2ed573;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Rubik', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 18, 24, 0.84);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    color: var(--text-dark);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.auth-card h2 {
    margin-bottom: 10px;
}

.auth-card p {
    margin-bottom: 14px;
}

.auth-status {
    min-height: 22px;
    color: #b33939;
    font-size: 0.95rem;
}

.logged-in-user {
    margin-top: 8px;
    color: #dfe4ea;
    font-size: 0.9rem;
}

.logout-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    background: #ff4757;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.logout-btn:hover {
    background: #ff6b81;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.settings-btn {
    position: absolute;
    left: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.settings-btn:hover {
    transform: rotate(90deg);
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    color: #ced6e0;
    margin-bottom: 15px;
}

.install-btn {
    background-color: #f39c12;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3);
    transition: all 0.2s;
    margin-bottom: 10px;
}

.install-btn:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
}

.recorder-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.character-selector {
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}

.selector-title {
    font-size: 0.9rem;
    color: #ced6e0;
    margin-bottom: 8px;
}

.characters-list {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.char-btn {
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.char-btn.selected {
    border-color: var(--primary-color);
    background: #ffeaa7;
    transform: scale(1.1);
}

.record-btn {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #ff6b81);
    border: 5px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(255, 71, 87, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.record-btn .icon {
    font-size: 2.5rem;
}

.record-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 25px rgba(255, 71, 87, 0.6);
}

.record-btn.recording {
    animation: pulse 1.5s infinite;
    background: linear-gradient(135deg, #ff4757, #ff0000);
    border-color: rgba(255, 255, 255, 0.5);
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(255, 71, 87, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.status-text {
    font-size: 1rem;
    color: #ced6e0;
    font-weight: 600;
}

.manual-entry {
    display: flex;
    gap: 10px;
}

.manual-entry input {
    flex: 1;
    padding: 15px;
    border-radius: var(--border-radius);
    border: none;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

.manual-entry button {
    padding: 0 20px;
    border-radius: var(--border-radius);
    border: none;
    background-color: var(--success-color);
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.manual-entry button:hover {
    background-color: #26de81;
}

.reminders-section h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ffa502;
}

.reminders-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reminder-item {
    background: var(--card-bg);
    color: var(--text-dark);
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}

.reminder-item.completed {
    opacity: 0.6;
    background: #dfe4ea;
}

.reminder-item.completed .reminder-text {
    text-decoration: line-through;
    color: #747d8c;
}

.reminder-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reminder-text {
    font-size: 1.2rem;
    font-weight: 600;
}

.reminder-date {
    font-size: 0.8rem;
    color: #747d8c;
}

.reminder-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-done {
    background-color: #f1f2f6;
    color: var(--success-color);
}
.btn-done:hover { background-color: var(--success-color); color: white; }

.btn-delete {
    background-color: #f1f2f6;
    color: var(--primary-color);
}
.btn-delete:hover { background-color: var(--primary-color); color: white; }

.btn-edit {
    background-color: #f1f2f6;
    color: #1e90ff;
}
.btn-edit:hover { background-color: #1e90ff; color: white; }

.btn-wa {
    background-color: #25D366;
    color: white;
    font-size: 1.1rem;
}
.btn-wa:hover { background-color: #128C7E; transform: scale(1.1); }

/* הסרת עיצוב כפתורי Google Calendar */

.read-all-btn {
    background-color: #9b59b6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.read-all-btn:hover {
    background-color: #8e44ad;
    transform: scale(1.05);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sound wave animation placeholder */
.wave {
    display: flex;
    gap: 5px;
    height: 30px;
    align-items: center;
}
.wave span {
    display: block;
    width: 6px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 3px;
    animation: waveAnim 1s infinite ease-in-out;
}
.wave span:nth-child(2) { animation-delay: 0.2s; }
.wave span:nth-child(3) { animation-delay: 0.4s; }
.wave span:nth-child(4) { animation-delay: 0.6s; }
.wave span:nth-child(5) { animation-delay: 0.8s; }

@keyframes waveAnim {
    0%, 100% { height: 10px; }
    50% { height: 30px; }
}

.hidden {
    display: none !important;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--bg-color);
    padding: 25px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    color: var(--text-light);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #ced6e0;
}

.close-btn:hover { color: white; }

.settings-section {
    margin-top: 20px;
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 12px;
}

.settings-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #ffa502;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.setting-row select {
    padding: 5px;
    border-radius: 5px;
    font-family: inherit;
}

.settings-char-list {
    list-style: none;
    margin-bottom: 15px;
}

.settings-char-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    color: var(--text-dark);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 5px;
}

.add-char-form {
    display: flex;
    gap: 5px;
}

.add-char-form input {
    padding: 8px;
    border-radius: 8px;
    border: none;
}

.add-char-form button {
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 10px;
    cursor: pointer;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}
input:checked + .slider { background-color: var(--success-color); }
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 24px; }
.slider.round:before { border-radius: 50%; }
