import SwiftUI

enum ViewerTheme {
    static let ink = Color(red: 0.071, green: 0.075, blue: 0.102)
    static let muted = Color(red: 0.357, green: 0.380, blue: 0.447)
    static let accent = Color(red: 0.231, green: 0.357, blue: 0.859)
    static let surface = Color(red: 0.969, green: 0.973, blue: 0.988)
    static let surfaceElevated = Color.white

    static var pageBackground: LinearGradient {
        LinearGradient(
            colors: [
                Color(red: 0.910, green: 0.933, blue: 1.0),
                surface,
                Color(red: 0.957, green: 0.941, blue: 1.0),
            ],
            startPoint: .topLeading,
            endPoint: .bottomTrailing
        )
    }
}

struct ViewerCard<Content: View>: View {
    @ViewBuilder var content: Content

    var body: some View {
        content
            .padding(16)
            .frame(maxWidth: .infinity, alignment: .leading)
            .background(
                RoundedRectangle(cornerRadius: 20, style: .continuous)
                    .fill(ViewerTheme.surfaceElevated)
                    .shadow(color: Color.black.opacity(0.06), radius: 12, y: 4)
            )
            .overlay(
                RoundedRectangle(cornerRadius: 20, style: .continuous)
                    .stroke(Color.black.opacity(0.06), lineWidth: 1)
            )
    }
}
