* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.view {
    min-height: 100vh;
}

header {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.auth-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.auth-form button {
    width: 100%;
    padding: 0.75rem;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.auth-form button:hover {
    background: #2980b9;
}

.auth-form p {
    text-align: center;
    margin-top: 1rem;
}

.auth-form a {
    color: #3498db;
    text-decoration: none;
}

.error {
    color: #e74c3c;
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    background: #fadbd8;
    display: none;
}

.error.show {
    display: block;
}

.success {
    color: #27ae60;
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    background: #d4edda;
    display: none;
}

#resend-verification-container {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

#resend-verification-container p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

#resend-verification-btn {
    background: #95a5a6;
    color: #fff;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

#resend-verification-btn:hover {
    background: #7f8c8d;
}

.success.show {
    display: block;
}

.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: #2c3e50;
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.server-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.server-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.server-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.server-card .role {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.breadcrumb {
    margin-bottom: 1.5rem;
    color: #7f8c8d;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.folder-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.folder-item,
.file-item {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
}

.folder-item:hover,
.file-item:hover {
    transform: translateY(-2px);
}

.folder-item::before {
    content: "📁";
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.file-item::before {
    content: "📄";
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.item-name {
    word-break: break-word;
    font-size: 0.9rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.item-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary {
    background: #3498db;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
}

.modal.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: #2c3e50;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.modal input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 3000;
}

.toast {
    background: #2c3e50;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

.modal-body {
    margin-bottom: 1rem;
}

.modal-body ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.modal-body p {
    margin-bottom: 0.5rem;
}

#delete-server-error {
    margin-top: 0.5rem;
}

#members-list {
    max-height: 500px;
    overflow-y: auto;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.member-info {
    flex: 1;
}

.member-email {
    font-weight: bold;
    color: #2c3e50;
}

.member-role {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.member-meta {
    color: #95a5a6;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.member-actions {
    display: flex;
    gap: 0.5rem;
}

.member-actions button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .server-grid {
        grid-template-columns: 1fr;
    }

    .item-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.2rem;
    }
}
