body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #f5f5f7;
    color: #1d1d1f;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    font-size: 16px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.5rem;
}

.subtitle {
    text-align: center;
    color: #86868b;
    margin-bottom: 25px;
    font-size: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.service-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(224, 224, 224, 0.4);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.service-card-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.service-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
}

.service-info {
    flex-grow: 1;
}

.service-info h3 {
    margin: 0 0 6px 0;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
}

.status {
    font-weight: 600;
    margin: 4px 0;
    font-size: 0.95rem;
}

.status.down {
    color: #ff453a;
}

.time {
    color: #1d1d1f;
    font-size: 0.85rem;
    margin: 0;
    font-weight: 500;
}

.last-update {
    text-align: center;
    color: #1d1d1f;
    font-size: 1rem;
    margin: 15px 0;
    font-weight: 500;
}

.no-data, .error {
    text-align: center;
    grid-column: 1 / -1;
    padding: 15px;
    color: #86868b;
    font-size: 1rem;
}

.refresh-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background-color: #0071e3;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
}

.refresh-button:hover {
    background-color: #0077ed;
}

.refresh-button:active {
    background-color: #0063c7;
}

.animation-container {
    width: 250px;
    height: 250px;
    margin: 0 auto 20px;
}

.hidden {
    display: none;
}

/* Стили модального окна в стиле iOS */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.32);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.active .modal-backdrop {
    opacity: 1;
}

.modal-container {
    width: 100%;
    background: #fff;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.modal.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 25px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
}

.close-button {
    width: 100%;
    padding: 12px;
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.close-button:active {
    background-color: #0062CC;
}

/* Анимация при закрытии */
.modal.closing .modal-container {
    transform: translateY(100%);
}

.modal.closing .modal-backdrop {
    opacity: 0;
}

.modal-status {
    font-weight: 600;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.modal-status.down {
    color: #ff453a;
}

.black-text {
    color: #1d1d1f !important;
    font-weight: 500;
}

.modal-stats {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 20px;
}

.modal-stat {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #1d1d1f;
    font-weight: 500;
}

.stat-title {
    font-size: 1.2rem;
    color: #1d1d1f;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.stat-list {
    padding-left: 20px;
    margin: 10px 0 20px 0;
}

.stat-list li {
    margin-bottom: 8px;
    font-size: 1.05rem;
    color: #1d1d1f;
    line-height: 1.5;
}

.bold-text {
    font-weight: 600;
}

/* Стили для мигающего текста */
.loading-text {
    text-align: center;
    margin: 20px 0;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.last-update {
    margin-top: 20px;
}

#update-time.hidden {
    display: none;
}