/* Основные стили */

/* Навигация */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand h2 {
    margin: 0;
    color: black;
    font-size: 2rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-btn {
    text-decoration: none;
    color: black;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-btn:hover {
    background-color: #f0f0f0;
    color: black;
}

.register-btn {
    background-color: black;
    color: white !important;
    border: 1px solid black;
}

.register-btn:hover {
    background-color: white;
    color: black !important;
    border: 1px solid black;
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }
    
    .navbar-brand h2 {
        font-size: 1.5rem;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .nav-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}
a {
    text-decoration: none !important;
}

.quick-shot-container {
    color: white;
    background-color: #ededed;
}

.quick-shot-header {
    text-align: center;
    padding-bottom: 150px;
    padding-top: 150px;
    padding-left: 15px;
    padding-right: 15px;
}

.quick-shot-title {
    font-size: 3rem;
    font-weight: bold;
    color: black;
    margin-bottom: 15px;
}

.quick-shot-subtitle {
    font-size: 1.2rem;
    color: black;
    margin-bottom: 30px;
}

.how-it-works {
    margin-bottom: 30px;
    color: black;
    padding: 20px;
    max-width: 1440px;
    padding-top: 100px;
    padding-bottom: 100px;
}

.how {
    display: flex;
    justify-content: center;
}

.section-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: black;
    text-align: center;
}

.section-title-2 {
    text-align: center;
    font-size: 1.5rem;
}

.steps-container {
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    text-align: start;
}

.step-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    justify-content: space-between;
}

.step-main {
    flex: 1;
    min-width: 0;
}

.step {
    background-color: #f4f3f5;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.step-content {
    display: flex;
    flex-direction: column;
}

.step img {
    width: 200px;
    height: auto;
}

.step-number {
    color: black;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 20px;
    border: 1px solid black;
}

.step-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: black;
}

.step-description {
    color: black;
    line-height: 1.6;
}

.faq-section {
    margin: 0 auto;
    padding: 50px 50px;
    max-width: 1440px;
}

/* Стили для infinite scroll */
.loading-indicator {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.end-message {
    text-align: center;
    padding: 30px 20px;
    color: #888;
    font-style: italic;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.end-message p {
    margin: 0;
    font-size: 16px;
}

/* Улучшения для контейнера изображений */
.images-container {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.images-container::-webkit-scrollbar {
    width: 8px;
}

.images-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.images-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.images-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.step-block {
    height: 100%;
}

.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
}

.faq-checkbox {
    display: none;
}

.faq-question {
    display: block;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    padding-right: 30px;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 22px;
    transition: transform 0.3s;
}

.faq-checkbox:checked+.faq-question::after {
    content: '−';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    font-size: 16px;
    color: #444;
    margin-top: 5px;
}

.faq-checkbox:checked+.faq-question+.faq-answer {
    max-height: 200px;
}

.contact-section {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    padding-top: 100px;
    padding-bottom: 100px;
    max-width: 100vw;
    margin: 0 auto;
    background-color: black;
    color: WHITE;
}

.contact-section p {
    font-size: 1.5rem
}

.contact-section h2 {
    color: white;
}

.contact-section button {
    background-color: #fff;
    color: black;
    margin-top: 50px;
}

.contact-btn {
    background-color: black;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 12px 25px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.4s;
    margin-top: 20px;
    border: 1px solid transparent;
}

.contact-btn:hover {
    background-color: white;
    border: 1px solid black;
    color: black;
}

.reg-btn {
    background-color: black;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 15px 100px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.4s;
    border: 1px solid transparent;
}

.reg-btn:hover {
    background-color: white;
    border: 1px solid black;
    color: black;
}

.footer {
    text-align: center;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
    border-top: 1px solid #444;
    color: #888;
    max-width: 100vw;
    background-color: #1b1b1b;
}

.navbar-wrapper {
    width: 100%;
    max-width: 1115px;
}

/* Login/Register страницы */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

.login-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    padding: 40px;
}

.login-header {
    color: #000;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    color: #222;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.login-form input {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    color: #000;
    padding: 12px 15px;
    width: 100%;
    transition: all 0.3s;
    box-sizing: border-box;
}

.login-form input:focus {
    border-color: black;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    outline: none;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me input {
    width: auto;
    margin-right: 10px;
}

.login-btn {
    background-color: black;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-btn:hover {
    background-color: #333;
}

.forgot-password {
    color: black;
    text-align: center;
    display: block;
    margin-top: 15px;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.register-link {
    color: #333;
    text-align: center;
    margin-top: 20px;
    font-weight: 500;
}

.register-link a {
    text-decoration: none;
    color: #333;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Legacy auth styles for compatibility */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

.auth-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    padding: 40px;
}

.auth-header {
    color: #000;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    color: #222;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.auth-form input {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    color: #000;
    padding: 12px 15px;
    width: 100%;
    transition: all 0.3s;
}

.auth-form input:focus {
    border-color: black;
    box-shadow: 0 0 0 2px black;
    outline: none;
}

.auth-btn {
    background-color: black;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.auth-btn:hover {
    background-color: #333;
}

.auth-link {
    color: #333;
    text-align: center;
    margin-top: 20px;
    font-weight: 500;
}

/* Dashboard стили */
.profile-container {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.profile-box {
    border-radius: 12px;
    color: white;
    width: 100%;
    max-width: 1440px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.profile-top {
    background-color: #2d2d2d;
    padding: 20px;
    color: white;
}

.profile-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.images-container {
    background-color: white;
    padding: 20px;
}

.image-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #333;
    flex-wrap: wrap;
}

.image-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.image-card img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

.image-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.delete-btn {
    background-color: #2d2d2d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.delete-btn:hover {
    background-color: #e60000;
}

.alert-success {
    background-color: #28a745;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 16px;
    color: #fff;
    text-align: center;
}

.badge {
    padding: 0px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .quick-shot-title {
        font-size: 1.8rem;
    }

    .quick-shot-subtitle {
        font-size: 1rem;
    }

    .step-row {
        flex-direction: column;
    }

    .step img {
        width: 100%;
        max-width: 250px;
    }

    .how-it-works {
        padding: 50px;
    }

    .faq-section {
        margin: 15px;
        padding: 20px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-title-2 {
        font-size: 1rem;
    }

    .contact-section p {
        font-size: 1rem
    }

    .profile-header {
        font-size: 20px;
        text-align: left;
    }

    .delete-btn {
        margin-top: 0;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        width: auto;
    }
    
    .navbar-brand h2 {
        font-size: 1.2rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 5px;
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .image-name {
        max-width: 100px;
    }
}

/* Admin styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: #2d2d2d;
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.admin-header h1 {
    margin: 0 0 15px 0;
    font-size: 1.8em;
}

.admin-header nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-header nav a {
    color: #ccc;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.admin-header nav a:hover,
.admin-header nav a.active {
    background: #444;
    color: white;
}

.admin-content {
    background: white;
    padding: 30px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.create-token-form,
.tokens-list,
.users-list {
    margin-bottom: 30px;
}

.create-token-form h3,
.tokens-list h3,
.users-list h3 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.token-result {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.token-display {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.token-display input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.token-display button {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.token-display button:hover {
    background: #0056b3;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

table tr:hover {
    background: #f8f9fa;
}

code {
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.8em;
    font-weight: 500;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
}

.badge-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-secondary {
    background: #e9ecef;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* Additional button styles */
.btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-outline-light {
    background: transparent;
    color: #f8f9fa;
    border: 1px solid #f8f9fa;
}

.btn-outline-light:hover {
    background: #f8f9fa;
    color: #212529;
}

/* Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* No images message */
.no-images {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-images p {
    margin: 0;
    font-size: 1.1em;
}

/* Utility classes */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-3 {
    gap: 12px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-md-0 {
    margin-top: 0;
}

/* Tab styles */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-button {
    cursor: pointer;
    padding: 10px;
    border: 1px solid #ccc;
    background: #f0f0f0;
}

.tab-button.active {
    background: #d0d0d0;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .mt-md-0 {
        margin-top: 8px;
    }

    .admin-container {
        padding: 10px;
    }

    .admin-content {
        padding: 20px;
    }

    .admin-header nav {
        flex-direction: column;
        gap: 10px;
    }

    .token-display {
        flex-direction: column;
    }

    table {
        font-size: 14px;
    }

    table th,
    table td {
        padding: 8px;
    }
}

/* Logout button styles for admin panel */
.logout-btn {
    background: none;
    border: none;
    color: #ccc;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #444;
    color: white;
}

/* ==================================== */
/* Новые стили для улучшенной галереи */
/* ==================================== */

/* Панель управления */
.control-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.btn-outline {
    background: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline:hover {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.selected-count {
    font-weight: bold;
    color: #495057;
    margin-left: auto;
}

/* Обновленные карточки изображений */
.images-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px;
}

.image-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.image-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.image-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.image-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.image-thumbnail {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 10px;
    position: relative;
}

.image-thumbnail:hover {
    opacity: 0.9;
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-thumbnail:hover img {
    transform: scale(1.05);
}

.image-name {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
    word-break: break-all;
}

.image-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}

.action-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f8f9fa;
    transform: scale(1.1);
}
