/* style.css */

@font-face {
    font-family: 'Play';
    src: url('../fonts/Play-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Play';
    src: url('../fonts/Play-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #2196F3;
    --secondary-color: #FF9800;
    --success-color: #4CAF50;
    --danger-color: #F44336;
    --warning-color: #FFC107;
    --info-color: #17a2b8;
    --light-color: #f5f5f5;
    --dark-color: #333;
    --card-shadow: 0 4px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Play', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: var(--dark-color);
    line-height: 1.6;
    font-size: 16px;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Мобільний header */
header {
    background: linear-gradient(135deg, var(--primary-color), #1976D2);
    color: white;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.logo-icon {
    font-size: 1.5rem;
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.nav button {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav button:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.language-selector {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: var(--transition);
}

.language-selector:hover {
    background: rgba(255,255,255,0.3);
}

.language-selector option {
    color: var(--dark-color);
    font-weight: 400;
    background: white;
}

/* Основні картки */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 10px;
    font-weight: 700;
}

/* Стилі для сповіщень */
.export-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 90%;
    animation: notificationSlideIn 0.3s ease-out;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.export-notification-content {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(0,0,0,0.1);
}

.export-notification-success {
    border-left-color: var(--success-color);
}

.export-notification-error {
    border-left-color: var(--danger-color);
}

.export-notification-warning {
    border-left-color: var(--warning-color);
}

.export-notification-info {
    border-left-color: var(--info-color);
}

.export-notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(33, 150, 243, 0.1);
}

.export-notification-success .export-notification-icon {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.export-notification-error .export-notification-icon {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

.export-notification-warning .export-notification-icon {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.export-notification-info .export-notification-icon {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
}

.export-notification-message {
    flex: 1;
    font-weight: 500;
    color: var(--dark-color);
    line-height: 1.4;
}

.export-notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-notification-close:hover {
    background: #f5f5f5;
    color: #666;
}

/* Таймер */
.timer-display {
    font-size: 2.5rem;
    text-align: center;
    font-weight: 700;
    margin: 20px 0;
    color: var(--dark-color);
    font-family: 'Play', 'Courier New', monospace;
    word-break: break-all;
}

/* Кнопки управління */
.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.95rem;
    min-height: 48px;
    flex: 1;
    min-width: 120px;
    max-width: 200px;
    font-family: 'Play', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-sm {
    padding: 8px 16px;
    min-height: 36px;
    font-size: 0.85rem;
    min-width: 80px;
}

/* Індикатор статусу */
.status-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    flex-shrink: 0;
}

.status-dot.active {
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Елементи звітів */
.report-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.report-controls select, .report-controls input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1;
    min-width: 120px;
    font-family: 'Play', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    background: white;
    transition: var(--transition);
}

.report-controls select:focus, .report-controls input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.report-controls button {
    flex: 1;
    min-width: 150px;
}

/* Стилі для карток звітів */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.report-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 20px;
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
    border: 1px solid rgba(0,0,0,0.05);
}

.report-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.report-card-date {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.report-card-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 500;
    color: var(--dark-color);
    text-align: right;
}

.time-badge {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.summary-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--primary-color), #1976D2);
    color: white;
    border-left: 4px solid var(--success-color);
}

.summary-card .detail-label {
    color: rgba(255,255,255,0.9);
}

.summary-card .detail-value {
    color: white;
}

.summary-card .time-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
}

/* Кнопки експорту */
.export-options {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.export-options .btn {
    flex: 1;
    min-width: 140px;
}

/* Модальні вікна */
.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 15px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 25px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
}

.modal-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    padding-right: 30px;
    font-weight: 700;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Play', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--dark-color);
    background: #f5f5f5;
}

/* Форми */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: 'Play', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Футер */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    color: #777;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Адаптивність для малих екранів */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 10px 0;
        position: relative;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo {
        font-size: 1.3rem;
        justify-content: center;
        width: 100%;
    }
    
    .nav {
        justify-content: center;
        width: 100%;
        gap: 8px;
    }
    
    .nav button {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        padding: 10px;
    }
    
    .language-selector {
        width: 100%;
        text-align: center;
    }
    
    .timer-display {
        font-size: 2rem;
        margin: 15px 0;
    }
    
    .controls {
        gap: 8px;
        margin: 15px 0;
    }
    
    .btn {
        padding: 14px 12px;
        font-size: 0.9rem;
        min-width: calc(50% - 10px);
        max-width: none;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .report-controls {
        flex-direction: column;
    }
    
    .report-controls select, 
    .report-controls input, 
    .report-controls button {
        width: 100%;
        min-width: auto;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .report-card {
        padding: 15px;
    }
    
    .export-options {
        flex-direction: column;
    }
    
    .export-options .btn {
        min-width: auto;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
        border-radius: 12px;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    /* Адаптація сповіщень для мобільних */
    .export-notification {
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .export-notification-content {
        padding: 14px;
        gap: 10px;
    }
    
    .export-notification-icon {
        font-size: 1.3rem;
        width: 28px;
        height: 28px;
    }
    
    .export-notification-message {
        font-size: 0.9rem;
    }
}

/* Адаптивність для дуже малих екранів */
@media (max-width: 480px) {
    .timer-display {
        font-size: 1.8rem;
    }
    
    .btn {
        min-width: 100%;
        padding: 16px 12px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav button, 
    .language-selector {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    .logo {
        font-size: 1.2rem;
        gap: 8px;
    }
    
    .logo-icon {
        font-size: 1.3rem;
    }
    
    .card {
        padding: 12px;
        border-radius: 10px;
    }
    
    .report-card {
        padding: 12px;
        border-radius: 10px;
    }
    
    .report-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .detail-value {
        text-align: left;
    }
    
    .modal-content {
        padding: 15px;
        border-radius: 10px;
    }
    
    .form-group input {
        padding: 14px;
    }
    
    /* Сповіщення для дуже малих екранів */
    .export-notification {
        top: 60px;
        right: 5px;
        left: 5px;
    }
    
    .export-notification-content {
        padding: 12px;
        gap: 8px;
    }
    
    .export-notification-message {
        font-size: 0.85rem;
    }
}

/* Адаптивність для великих екранів */
@media (min-width: 1200px) {
    .container {
        padding: 25px;
    }
    
    .timer-display {
        font-size: 3.5rem;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 1.05rem;
        border-radius: 10px;
    }
    
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 20px;
    }
    
    .card {
        border-radius: 16px;
    }
    
    .report-card {
        border-radius: 16px;
    }
    
    /* Сповіщення для великих екранів */
    .export-notification {
        right: 25px;
        max-width: 450px;
    }
    
    .export-notification-content {
        padding: 20px;
        border-radius: 16px;
    }
}

/* Покращення для iOS */
@supports (-webkit-touch-callout: none) {
    .btn {
        -webkit-tap-highlight-color: transparent;
    }
    
    input, select, textarea {
        font-size: 16px;
    }
    
    .nav button {
        -webkit-tap-highlight-color: rgba(255,255,255,0.3);
    }
}

/* Покращення доступності */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .status-dot.active {
        animation: none;
    }
    
    .report-card:hover,
    .btn:hover,
    .nav button:hover {
        transform: none;
    }
    
    .export-notification {
        animation: none;
    }
}

/* Стилі для стану без даних */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.no-data-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Додаткові стилі для елементів форми в налаштуваннях сповіщень */
.notification-time-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.notification-time-row label {
    min-width: 120px;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.notification-time-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Стилі для реального часу */
.real-time-display {
    font-family: 'Play', 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(33, 150, 243, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(33, 150, 243, 0.2);
}
