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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.about-link {
    color: white;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.about-link:hover {
    opacity: 0.7;
}

.about-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    color: #333;
}

.about-section h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.about-section p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.about-section ul {
    margin: 10px 0 15px 25px;
    line-height: 1.8;
}

.about-section a {
    color: #667eea;
    text-decoration: none;
}

.about-section a:hover {
    text-decoration: underline;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#paper-title {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
}

#paper-title:focus {
    border-color: #667eea;
}

#search-btn {
    padding: 12px 30px;
    font-size: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
    font-weight: 600;
}

#search-btn:hover {
    transform: translateY(-2px);
}

#search-btn:active {
    transform: translateY(0);
}

#status-message {
    margin-top: 20px;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

#status-message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
    display: block;
}

#status-message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
    display: block;
}

#status-message.info {
    background: #eef;
    color: #33c;
    border: 1px solid #ccf;
    display: block;
}

.graph-wrapper {
    position: relative;
    margin-bottom: 20px;
}

#network-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 600px;
}

#paper-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    max-height: 500px;
    backdrop-filter: blur(5px);
    z-index: 1000;
    pointer-events: all;
    transition: all 0.3s ease;
}

#paper-info.collapsed {
    max-height: 60px;
    overflow: hidden;
}

.paper-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#paper-info h3 {
    color: #667eea;
    margin: 0;
}

.toggle-info-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-info-btn:hover {
    background: #764ba2;
}

.paper-details-content {
    overflow-y: auto;
    max-height: 420px;
}

#paper-details {
    color: #333;
}

#paper-details h4 {
    margin: 10px 0 5px 0;
    color: #764ba2;
}

#paper-details p {
    margin: 5px 0;
    line-height: 1.6;
}

.paper-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.paper-meta {
    color: #666;
    font-size: 0.9rem;
}

.paper-meta a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.paper-meta a:hover {
    color: #764ba2;
    text-decoration: underline;
}
