/* Geri Sayım Aracı CSS - Tüm stiller tek dosyada */

/* Reset CSS */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Tema değiştirme için gerekli CSS */
html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

/* CSS Değişkenleri - Tema renkleri için */
:root {
  --gsa-primary: #4f46e5;
  --gsa-secondary: #6366f1;
  --gsa-text-primary: #333333;
  --gsa-text-secondary: #666666;
  --gsa-text-light: #cccccc;
  --gsa-bg-primary: #ffffff;
  --gsa-bg-secondary: #f3f4f6;
  --gsa-bg-tertiary: #e5e7eb;
  --gsa-bg-forground: #efefef;
  --gsa-danger: #ff3333;
  --gsa-success: #10b981;
  --gsa-transition-speed: 0.3s;
}

/* Karanlık tema renkleri */
[data-theme="dark"] {
  --gsa-primary: #6366f1;
  --gsa-secondary: #818cf8;
  --gsa-text-primary: #f3f4f6;
  --gsa-text-secondary: #d1d5db;
  --gsa-text-light: #6b7280;
  --gsa-bg-primary: #1f2937;
  --gsa-bg-secondary: #111827;
  --gsa-bg-tertiary: #374151;
  --gsa-bg-forground: #000000;
}

/* Yanıp sönme animasyonu */
@keyframes gsa-blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Kırmızı renk sınıfları */
.gsa-text-red {
    color: var(--gsa-danger) !important;
}

.gsa-bg-red {
    background-color: var(--gsa-danger) !important;
}

.gsa-blink {
    animation: gsa-blink 0.5s ease-in-out infinite;
}

/* Temel Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
}

/* Buton ve etkileşim elementleri için cursor pointer */
button, select, a, .gsa-preset-btn, .gsa-btn, .gsa-icon-btn, .gsa-tab {
    cursor: pointer;
}

/* Tailwind ve DaisyUI'dan gelen gerekli utility sınıfları */
.hidden {
    display: none !important;
}

/* Flex container */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

/* Margin ve padding */
.m-0 {
    margin: 0;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Genişlik ve yükseklik */
.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

/* Yazı stilleri */
.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

/* Kenar yuvarlaklığı */
.rounded {
    border-radius: 0.25rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Transition */
.transition {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Opacity */
.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* Position */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.bottom-0 {
    bottom: 0;
}

/* Z-index */
.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}

/* Body Stilleri */
body {
    width: 100%;
    max-width: 100%;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--gsa-bg-primary);
    text-align: center;
}

/* Ana İçerik Alanı */
.gsa-main-content {
    display: flex;
    margin-bottom: 5vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
}

/* Hazır Ayar Başlığı */
.gsa-preset-title-container {
    min-height: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.gsa-preset-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--gsa-primary);
    margin: 0;
    padding: 0 0.5rem;
    opacity: 0; /* Başlangıçta görünmez */
    transition: opacity var(--gsa-transition-speed) ease;
    width: 100%;
    text-align: center;
}

.gsa-preset-title.active {
    opacity: 1; /* Görünür durumda */
}

/* Sekmeler */
.gsa-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.gsa-tab-icon {
    width: 18px;
    height: 18px;
    margin-right: 2px;
}

.gsa-tab {
    padding: 0.75rem 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--gsa-text-secondary);
    position: relative;
    transition: color var(--gsa-transition-speed) ease;
}

.gsa-tab-active {
    color: var(--gsa-primary);
}

.gsa-tab-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--gsa-primary);
    transition: transform var(--gsa-transition-speed) ease;
}



/* İçerik Alanı */
.gsa-content {
    text-align: center;
    width: 100%;
}

.gsa-content.hidden {
    display: none;
}

/* Saat Gösterimi */
.gsa-timer {
    font-size: 15vw;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1;
    color: var(--gsa-text-primary);
    width: 75vw;
    margin-left: auto;
    margin-right: auto;
}

.gsa-seconds {
    color: var(--gsa-text-light);
}

/* Başlangıç saatine kadar olan sürede gösterge rengi */
.gsa-waiting-time {
    color: var(--gsa-text-light) !important;
}

/* İlerleme Çubuğu */
.gsa-progress-container {
    width: 60vw;
    height: 8px;
    background-color: var(--gsa-bg-tertiary);
    border-radius: 4px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
    transition: opacity var(--gsa-transition-speed) ease;
}

.gsa-progress-bar {
    height: 100%;
    background-color: var(--gsa-primary);
    width: 0%;
    transition: width 1s linear;
    border-radius: 4px;
}

/* Durum Metni */
.gsa-status {
    color: var(--gsa-text-secondary);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    width: 75vw;
    margin-left: auto;
    margin-right: auto;
}

/* Butonlar */
.gsa-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    transition: opacity var(--gsa-transition-speed) ease;
}

.gsa-btn {
    font-size: 1rem;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    background-color: var(--gsa-primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--gsa-transition-speed) ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Başlat/Duraklat/Devam Et butonunun genişliğini sabit tut */
#start-btn {
    min-width: 150px;
    justify-content: center;
}

.gsa-btn-icon {
    margin-right: 0.25rem;
}

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

.gsa-btn-disabled,
.gsa-btn-disabled:hover {
    background-color: #a5a5a5;
    cursor: not-allowed;
    transform: none;
}

.gsa-btn-full {
    padding: 5px;
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* Kontrol Butonları */
.gsa-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.gsa-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--gsa-bg-secondary);
    color: var(--gsa-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--gsa-transition-speed) ease;
}

.gsa-icon-btn:hover {
    background-color: var(--gsa-bg-tertiary);
    color: var(--gsa-text-primary);
}

/* Footer */
.gsa-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    color: var(--gsa-text-secondary);
    background-color: transparent;
}

[data-theme="dark"] .gsa-footer {
    background-color: transparent;
    color: var(--gsa-text-light);
}

.gsa-credit {
    color: var(--gsa-primary);
    text-decoration: none;
    cursor: default;
}

.gsa-credit:hover {
    color: var(--gsa-primary);
}

[data-theme="dark"] .gsa-credit,
[data-theme="dark"] .gsa-credit:hover {
    color: var(--gsa-secondary);
}

/* Hover efekti kaldırıldı */

/* Ayarlar Paneli */
.gsa-settings-panel {
    position: fixed;
    top: 0;
    left: -380px; /* Başlangıçta gizli */
    width: 380px;
    height: 100vh;
    background-color: var(--gsa-bg-forground);
    z-index: 1000;
    padding-top: 0.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    overflow-y: auto;
    transition: left var(--gsa-transition-speed) ease;
}

.gsa-settings-panel.active {
    left: 0;
}

.gsa-settings-header {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gsa-bg-tertiary);
}

.gsa-settings-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gsa-text-primary);
}

.gsa-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--gsa-text-secondary);
    transition: color var(--gsa-transition-speed) ease;
}

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

.gsa-settings-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gsa-bg-tertiary);
}

.gsa-settings-section h3 {
    text-align: right;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--gsa-text-primary);
}

.gsa-time-inputs {
    max-width: 50%;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex: 1;
    flex-wrap: nowrap;
    min-width: 0;
    justify-content: right;
}

.gsa-time-input {
    flex: 1;
    min-width: 0;
    max-width: 80px;
}

.gsa-time-input label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--gsa-text-secondary);
}

.gsa-select {
    width: 100%;
    max-width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--gsa-bg-tertiary);
    border-radius: 0.5rem;
    background-color: var(--gsa-bg-primary);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px 10px;
}

.gsa-time-range {
    margin-bottom: 0.75rem;
}

.gsa-time-point {
    margin-bottom: 0.75rem;
}

.gsa-time-row {
    justify-content: right;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
}

.gsa-time-label {
    width: 80px;
    min-width: 80px;
    padding-bottom: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ayar başlıkları için ortak stil */
.gsa-setting-title {
    text-align: right;
    color: var(--gsa-text-primary);
    font-weight: 500;
}

.gsa-note {
    text-align: right;
    font-size: 0.875rem;
    color: var(--gsa-primary);
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.gsa-preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gsa-preset-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 0.25rem;
    background-color: rgba(79, 70, 229, 0.1); /* Mor rengin açık hafif tonu */
    text-align: left;
    cursor: pointer;
    transition: all var(--gsa-transition-speed) ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gsa-preset-btn:hover {
    background-color: rgba(79, 70, 229, 0.2); /* Hover durumunda biraz daha koyu ton */
}

.preset-name {
    font-weight: 500;
    color: var(--gsa-text-primary);
}

.preset-duration {
    font-weight: 600;
    color: var(--gsa-primary);
}

/* Footer */
.gsa-footer {
    padding: 1rem;
    text-align: center;
    width: 100%;
}

.gsa-credit {
    color: var(--gsa-text-light);
    text-decoration: none;
    font-size: 0.875rem;
}

.gsa-credit:hover {
    color: var(--gsa-primary);
}

/* Koyu Tema */
[data-theme="dark"] .gsa-container {
    background-color: var(--gsa-bg-primary);
}

/* Duyarlı tasarım için medya sorguları */
@media screen and (max-width: 768px) {
    .gsa-timer {
        font-size: 18vw;
    }
    
    .gsa-progress-container {
        width: 80vw;
    }
    
    .gsa-settings-panel {
        width: 100%;
        left: -100%;
    }
    
    .gsa-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .gsa-btn {
        width: 100%;
    }
    
    .gsa-controls {
        margin-top: 1rem;
    }
    
    .gsa-time-row {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        width: 100%;
        flex-wrap: nowrap !important;
    }
    
    .gsa-time-inputs {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem;
    }
    
    .gsa-time-label {
        width: 70px;
        min-width: 70px;
        padding-bottom: 0;
        display: flex;
        align-items: center;
    }
}

@media screen and (max-width: 480px) {
    .gsa-timer {
        font-size: 20vw;
    }
    
    .gsa-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .gsa-tab {
        width: 100%;
        justify-content: center;
    }
    
    .gsa-preset-title {
        font-size: 1.25rem;
    }
    
    .gsa-time-row {
        flex-wrap: nowrap !important;
        width: 100%;
        flex-direction: row !important;
    }
    
    .gsa-time-inputs {
        flex-wrap: nowrap !important;
        gap: 0.25rem;
        flex-direction: row !important;
    }
    
    .gsa-time-label {
        width: 60px;
        min-width: 60px;
        font-size: 0.8rem;
        padding-bottom: 0;
    }
    
    .gsa-select {
        padding: 0.3rem;
        font-size: 0.85rem;
        max-width: 65px;
        background-position: right 0.3rem center;
    }
    
    .gsa-time-input {
        max-width: 65px;
    }
}

/* Koyu tema için gsa-card stili kaldırıldı */

[data-theme="dark"] .gsa-tab {
    color: var(--gsa-text-secondary);
}

[data-theme="dark"] .gsa-tab-active {
    color: var(--gsa-text-primary);
    border-bottom-color: var(--gsa-primary);
}

[data-theme="dark"] .gsa-timer {
    color: var(--gsa-text-primary);
}

[data-theme="dark"] .gsa-progress {
    background-color: var(--gsa-bg-tertiary);
}

[data-theme="dark"] .gsa-progress-bar {
    background-color: var(--gsa-primary);
}

[data-theme="dark"] .gsa-status {
    color: var(--gsa-text-secondary);
}

[data-theme="dark"] .gsa-btn {
    background-color: var(--gsa-primary);
}

[data-theme="dark"] .gsa-btn-disabled,
[data-theme="dark"] .gsa-btn-disabled:hover {
    background-color: var(--gsa-bg-tertiary);
    color: var(--gsa-text-secondary);
    opacity: 0.7;
    border: 1px solid var(--gsa-bg-tertiary);
}

[data-theme="dark"] .gsa-btn:hover {
    background-color: var(--gsa-secondary);
}

[data-theme="dark"] .gsa-icon-btn {
    background-color: var(--gsa-bg-primary);
    color: var(--gsa-text-secondary);
}

[data-theme="dark"] .gsa-icon-btn:hover {
    background-color: var(--gsa-bg-tertiary);
    color: var(--gsa-text-primary);
}

[data-theme="dark"] .gsa-settings-panel {
    background-color: var(--gsa-bg-forground);
}

[data-theme="dark"] .gsa-settings-header,
[data-theme="dark"] .gsa-settings-section {
    border-bottom-color: var(--gsa-bg-tertiary);
}

[data-theme="dark"] .gsa-settings-header h2 {
    color: var(--gsa-text-primary);
}

[data-theme="dark"] .gsa-close-btn {
    color: var(--gsa-text-secondary);
}

[data-theme="dark"] .gsa-settings-section h3 {
    color: var(--gsa-text-primary);
}

[data-theme="dark"] .gsa-time-input label {
    color: var(--gsa-text-secondary);
}

[data-theme="dark"] .gsa-setting-title {
    color: var(--gsa-text-primary) !important;
    font-weight: 600;
}

[data-theme="dark"] .gsa-select {
    border-color: var(--gsa-bg-tertiary);
    background-color: var(--gsa-bg-primary);
    color: var(--gsa-text-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .gsa-note {
    color: var(--gsa-text-light);
}

[data-theme="dark"] .gsa-preset-btn {
    background-color: var(--gsa-primary)    ;
    color: var(--gsa-text-primary);
}

[data-theme="dark"] .preset-name {
    color: var(--gsa-text-primary);
    font-weight: 600;
}

[data-theme="dark"] .preset-duration {
    color: var(--gsa-text-primary);
    font-weight: 600;
}

[data-theme="dark"] .gsa-preset-btn:hover {
    background-color: var(--gsa-bg-tertiary);
    border-color: var(--gsa-bg-tertiary);
}

[data-theme="dark"] .gsa-footer {
    border-top-color: var(--gsa-bg-tertiary);
}

[data-theme="dark"] .gsa-credit {
    color: var(--gsa-text-light);
}

[data-theme="dark"] .gsa-credit:hover {
    color: var(--gsa-primary);
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .gsa-timer {
        font-size: 6rem;
    }
    
    .gsa-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .gsa-btn {
        width: 100%;
    }
    
    .gsa-settings-panel {
        width: 100%;
        left: -100%;
    }
}

@media (max-width: 480px) {
    .gsa-timer {
        font-size: 4rem;
    }
    
    .gsa-content {
        padding: 1.5rem;
    }
    
    .gsa-time-inputs {
        flex-direction: column;
        gap: 0.75rem;
    }
}