/* Стили для форм авторизации */
.auth-form {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.auth-form input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.auth-form button {
    width: 100%;
    padding: 0.8rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.auth-form button:hover {
    background-color: #2980b9;
}

.error {
    color: #e74c3c;
    margin-bottom: 1rem;
    text-align: center;
}

.form-toggle {
    text-align: center;
    margin-top: 1rem;
}

.form-toggle a {
    color: #3498db;
    text-decoration: none;
}

.form-toggle a:hover {
    text-decoration: underline;
}

/* Стили для личного кабинета */
.hero-image-container {
    position: relative;
    width: 100%;
    max-height: 300px;
    height: auto;
    aspect-ratio: 16/6;
    overflow: visible;
    border-radius: 8px;
    margin-bottom: 100px;
    background-color: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.avatar-overlay {
    position: absolute;
    left: 40px;
    bottom: -80px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid white;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 10;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 80px;
    font-weight: bold;
    color: #555;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.image-upload-form input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.image-upload-form {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    gap: 10px;
    z-index: 20;
}

.image-upload-label {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    cursor: pointer;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s;
    position: relative;
}

.image-upload-label:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.image-upload-label::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(39,115,207,1);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-bottom: 5px;
}

.image-upload-label:hover::before {
    opacity: 1;
}

.image-upload-label[for="background-upload"]::after {
    content: "???";
    font-size: 18px;
}

.image-upload-label[for="avatar-upload"]::after {
    content: "??";
    font-size: 18px;
}

.welcome-text {
    position: absolute;
    left: 30px;
    top: 30px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    max-width: 60%;
}

.welcome-text h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.profile-container {
    display: flex;
    margin-top: 40px;
    gap: 20px;
    position: relative;
}

.profile-sidebar {
    width: 20%;
    min-width: 200px;
}

.profile-menu {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.profile-menu ul {
    list-style: none;
}

.profile-menu li {
    border-bottom: 1px solid #eee;
}

.profile-menu li:last-child {
    border-bottom: none;
}

.profile-menu li a {
    display: block;
    padding: 15px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s;
}

.profile-menu li:hover a {
    background-color: #f8f8f8;
    color: #3498db;
}

.profile-menu li.active a {
    background-color: #3498db;
    color: white;
}

.profile-content {
    width: 80%;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.profile-form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.profile-form h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.profile-info-container {
    width: 100%;
    margin-bottom: 2rem;
}

.profile-info-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.profile-info-item {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.profile-info-item label {
    display: block;
    font-weight: bold;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.profile-info-item span {
    font-size: 1rem;
    color: #2c3e50;
}

.tab-icons-container {
    position: relative;
    z-index: 10;
    margin-bottom: 20px;
}

.tab-icons {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    position: relative;
    padding: 6px 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.tab-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #ddd;
    flex-shrink: 0;
    position: relative;
}

.tab-icon:hover {
    background-color: #e9e9e9;
}

.tab-icon.active {
    background-color: #6e8efb;
    color: white;
    border-color: #6e8efb;
}

.tab-icon i {
    font-size: 24px;
}

.tab-icon::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(39,115,207,1);
    color: white;
    padding: 15px 35px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
    margin-bottom: 5px;
    pointer-events: none;
}

.tab-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.tab-icon::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    margin-bottom: -5px;
}

.tab-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Стили для модерации */
.moderation-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.moderation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.file-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background: #fff;
}

.file-preview {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.file-info {
    margin-bottom: 10px;
}

.file-actions {
    display: flex;
    justify-content: space-between;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
}

.approve-btn {
    background-color: #2ecc71;
}

.reject-btn {
    background-color: #e67e22;
}

.delete-btn {
    background-color: #e74c3c;
}

.message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
}

.user-info {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
}

/* Стили для облачного хранилища */
.storage-info {
    margin-top: 20px;
}

.storage-summary, .storage-details {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.storage-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.storage-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.storage-item label {
    font-weight: 600;
    color: #555;
}

.storage-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.upgrade-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.upgrade-btn:hover {
    background-color: #45a049;
}

.projects-list {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

/* Стили для кнопок профиля */
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.profile-actions button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.edit-btn {
    background-color: #3498db;
    color: white;
}

.change-password-btn {
    background-color: #2ecc71;
    color: white;
}

.cloud-storage-btn {
    background-color: #9b59b6;
    color: white;
}

.show-projects-btn {
    background-color: #e67e22;
    color: white;
}

.profile-actions button:hover {
    opacity: 0.9;
}

/* Стили для списка проектов */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.project-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.project-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.project-date {
    font-size: 0.85em;
    color: #666;
}

/* Стили для файлов */
.file-list-container {
    padding: 20px;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.file-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
}

.file-item img, .file-item video, .file-item audio {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.file-name {
    font-size: 0.9em;
    word-break: break-word;
}

.stats-btn {
    background-color: #3498db;
    color: white;
}

.file-actions {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.file-action-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}

.file-action-btn.active {
    border-bottom-color: #3498db;
    font-weight: bold;
}

.file-content {
    display: none;
}

.file-content.active {
    display: block;
}

.file-status {
    color: #e67e22;
    font-size: 0.8em;
    margin-top: 5px;
}

/* Стили для сообщений */
.success-message {
    color: #2ecc71;
    background-color: #eafaf1;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #a3e9b9;
}

.error-message {
    color: #e74c3c;
    background-color: #fdedec;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #f5b7b1;
}

.file-time {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

/* Кнопка модератора */
.moderation-btn {
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.moderation-btn:hover {
    background-color: #2980b9;
}

.moderation-btn i {
    margin-right: 5px;
}

/* Стили для статусов файлов */
.file-status {
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 5px;
}

.file-status.pending {
    background-color: #ffc107;
    color: #000;
}

.file-status.rejected {
    background-color: #dc3545;
    color: #fff;
}

.rejection-reason {
    font-size: 12px;
    color: #dc3545;
    margin-top: 5px;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 5px;
}

.delete-btn:hover {
    background-color: #c82333;
}

.file-item {
    position: relative;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    background: #fff;
}

.file-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 5px;
    font-weight: bold;
}

.file-status.pending {
    background-color: #ffc107;
    color: #000;
}

.file-status.rejected {
    background-color: #dc3545;
    color: #fff;
}

.rejection-reason {
    font-size: 12px;
    color: #dc3545;
    margin: 5px 0;
    padding: 5px;
    background: #f8d7da;
    border-radius: 3px;
}

.rejection-time {
    font-size: 11px;
    color: #6c757d;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
}

.delete-btn:hover {
    background-color: #c82333;
}

.file-icon {
    font-size: 40px;
    text-align: center;
    margin: 10px 0;
}

/* Дополнительные стили для кнопок */
.file-action-btn {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.file-action-btn:hover {
    background-color: #e9e9e9;
}

.file-action-btn.active {
    background-color: #3498db;
    color: white;
    border-bottom-color: #3498db;
}

.submit-btn {
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #2980b9;
}

.cancel-btn {
    background-color: #e74c3c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background-color: #c0392b;
}

.upgrade-btn {
    background-color: #2ecc71;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.upgrade-btn:hover {
    background-color: #27ae60;
}

/* Стили для индикатора сложности пароля */
.password-strength {
    width: 100%;
    height: 5px;
    background-color: #eee;
    margin-top: 5px;
    border-radius: 3px;
    overflow: hidden;
}

.strength-meter {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
}

/* Стили для сообщений об ошибках */
.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.success-message {
    color: #2ecc71;
    background-color: #eafaf1;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #a3e9b9;
}

/* Стили для форм */
.storage-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.storage-summary, .storage-details {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.storage-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.storage-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.storage-item label {
    font-weight: 600;
    color: #555;
}

.storage-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Стили для файловых элементов */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.file-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    background: white;
}

.file-item img, .file-item video, .file-item audio {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.file-name {
    font-size: 0.9em;
    word-break: break-word;
}

.file-time {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

.file-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 5px;
    font-weight: bold;
}

.file-status.pending {
    background-color: #ffc107;
    color: #000;
}

.file-status.rejected {
    background-color: #dc3545;
    color: #fff;
}

/* Стили для полей ввода как в login.php */
.profile-form-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin-top: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.profile-form-container h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #f9f9f9;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
    outline: none;
    background-color: white;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

.password-strength {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-meter {
    height: 100%;
    width: 0%;
    transition: width 0.3s, background-color 0.3s;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-form-container {
    animation: fadeIn 0.4s ease-out;
}